[gthumb] duplicate the file before adding it to the monitored locations set



commit 6a4b1d8da01e900ebd7c02c1efec921d5847d3fa
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Mon Apr 3 18:15:55 2017 +0200

    duplicate the file before adding it to the monitored locations set

 gthumb/gth-folder-tree.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gthumb/gth-folder-tree.c b/gthumb/gth-folder-tree.c
index d34092b..588aa9a 100644
--- a/gthumb/gth-folder-tree.c
+++ b/gthumb/gth-folder-tree.c
@@ -473,7 +473,7 @@ _gth_folder_tree_add_to_monitor (GthFolderTree *folder_tree,
        }
 
        gth_file_source_monitor_directory (file_source, file, TRUE);
-       g_hash_table_add (folder_tree->priv->monitor.locations, file);
+       g_hash_table_add (folder_tree->priv->monitor.locations, g_file_dup (file));
 }
 
 


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