[gnome-builder/wip/libide] libide: be defensive about file location



commit c49a1074632c96dd026f875172b0b2c7440ceef4
Author: Christian Hergert <christian hergert me>
Date:   Sun Mar 15 12:18:09 2015 -0700

    libide: be defensive about file location

 libide/ide-buffer-manager.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-buffer-manager.c b/libide/ide-buffer-manager.c
index 865e629..afa5634 100644
--- a/libide/ide-buffer-manager.c
+++ b/libide/ide-buffer-manager.c
@@ -766,6 +766,9 @@ ide_buffer_manager_save_file__load_settings_cb (GObject      *object,
   g_assert (IDE_IS_FILE (state->file));
   g_assert (IDE_IS_PROGRESS (state->progress));
 
+  if (!gtk_source_file_get_location (source_file))
+    gtk_source_file_set_location (source_file, ide_file_get_file (file));
+
   saver = gtk_source_file_saver_new (GTK_SOURCE_BUFFER (state->buffer), source_file);
 
   /* set file encoding and newline style defaults */


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