[gthumb] comments: do not emit a changed event if the file is not changed



commit caacbb311203c9c6acb20e16c799ca3ca50b10cd
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Mar 2 12:54:36 2014 +0100

    comments: do not emit a changed event if the file is not changed

 extensions/comments/gth-comment.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/extensions/comments/gth-comment.c b/extensions/comments/gth-comment.c
index 44db9c8..e76e17d 100644
--- a/extensions/comments/gth-comment.c
+++ b/extensions/comments/gth-comment.c
@@ -702,14 +702,13 @@ gth_comment_update_from_general_attributes (GthFileData *file_data)
                        g_file_make_directory (comment_directory, NULL, NULL);
 
                buffer = gth_comment_to_data (comment, &size);
-               _g_file_write (comment_file,
-                              FALSE,
-                              G_FILE_CREATE_NONE,
-                              buffer,
-                              size,
-                              NULL,
-                              NULL);
-
+               if (_g_file_write (comment_file,
+                                  FALSE,
+                                  G_FILE_CREATE_NONE,
+                                  buffer,
+                                  size,
+                                  NULL,
+                                  NULL))
                {
                        GFile *parent;
                        GList *list;


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