[gnome-builder] libide: only setup temp file once



commit 4aece4658b108368239bf91a66fcf5d9356fbfa9
Author: Christian Hergert <christian hergert me>
Date:   Tue Mar 3 00:05:21 2015 -0800

    libide: only setup temp file once

 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 68bdb83..f9fb84d 100644
--- a/libide/ide-unsaved-files.c
+++ b/libide/ide-unsaved-files.c
@@ -463,7 +463,6 @@ ide_unsaved_files_update (IdeUnsavedFiles *self,
               g_clear_pointer (&unsaved->content, g_bytes_unref);
               unsaved->content = g_bytes_ref (content);
               unsaved->sequence = priv->sequence;
-              setup_tempfile (file, &unsaved->temp_fd, &unsaved->temp_path);
             }
 
           /*
@@ -483,6 +482,7 @@ ide_unsaved_files_update (IdeUnsavedFiles *self,
   unsaved->file = g_object_ref (file);
   unsaved->content = g_bytes_ref (content);
   unsaved->sequence = priv->sequence;
+  setup_tempfile (file, &unsaved->temp_fd, &unsaved->temp_path);
 
   g_ptr_array_insert (priv->unsaved_files, 0, unsaved);
 }


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