[tracker/miner-fs-refactor: 69/120] libtracker-miner: Only emit ::file-deleted on folders for the toplevel being deleted



commit 19f6fc73fb5e663bc7ad560acbb4df3302e48824
Author: Carlos Garnacho <carlos lanedo com>
Date:   Tue Oct 4 11:31:11 2011 +0200

    libtracker-miner: Only emit ::file-deleted on folders for the toplevel being deleted

 src/libtracker-miner/tracker-file-notifier.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index d488e12..c25cb8e 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -208,6 +208,9 @@ file_notifier_traverse_tree_foreach (GFile    *file,
 	if (store_mtime && !disk_mtime) {
 		/* In store but not in disk, delete */
 		g_signal_emit (notifier, signals[FILE_DELETED], 0, file);
+
+		/* Only emit it for the toplevel folder, if it is a folder */
+		return TRUE;
 	} else if (disk_mtime && !store_mtime) {
 		/* In disk but not in store, create */
 		g_signal_emit (notifier, signals[FILE_CREATED], 0, file);



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