[tracker/miner-fs-refactor: 105/119] libtracker-miner: Remove deleted folders from being tracked



commit 6cbf7228e7c59a602073fe804bd0461478bf8bea
Author: Carlos Garnacho <carlos lanedo com>
Date:   Thu Oct 20 19:19:22 2011 +0200

    libtracker-miner: Remove deleted folders from being tracked
    
    Directories are now removed from the TrackerFileSystem if a delete
    monitor event happens on a dir.

 src/libtracker-miner/tracker-file-notifier.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index 5ac7761..22753ee 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -817,6 +817,13 @@ monitor_item_deleted_cb (TrackerMonitor *monitor,
 	canonical = tracker_file_system_get_file (priv->file_system,
 	                                          file, file_type, NULL);
 	g_signal_emit (notifier, signals[FILE_DELETED], 0, canonical);
+
+	if (is_directory) {
+		/* Delete all files underneath this dir from the filesystem */
+		tracker_file_system_delete_files (priv->file_system,
+						  file,
+						  G_FILE_TYPE_UNKNOWN);
+	}
 }
 
 static void



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