[gnome-builder] Don't autoload files that don't exist



commit 7285c5f424f5c3e89b0c9d6a87b450c10b6e8030
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Fri Aug 28 21:46:54 2015 -0500

    Don't autoload files that don't exist
    
    Open some file in some project, then close Builder. Delete the file.
    Reopen Builder, and reopen the project. Builder opens the file again,
    displaying it as a blank file. This is confusing, since the file doesn't
    exist.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754269

 libide/ide-unsaved-files.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libide/ide-unsaved-files.c b/libide/ide-unsaved-files.c
index c828fba..c2af953 100644
--- a/libide/ide-unsaved-files.c
+++ b/libide/ide-unsaved-files.c
@@ -335,7 +335,7 @@ ide_unsaved_files_restore_worker (GTask        *task,
         continue;
 
       file = g_file_new_for_uri (lines [i]);
-      if (!file)
+      if (!file || !g_file_query_exists (file, NULL))
         continue;
 
       hash = hash_uri (lines [i]);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]