[tracker] Bug 620486 - Ignored files can still be found after changing tracker-miner-fs.cfg



commit 8b7f9e45b02513ef378cd964b6332cdb9fc06910
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Jun 23 13:13:51 2010 +0200

    Bug 620486 - Ignored files can still be found after changing tracker-miner-fs.cfg
    
    Put items in deleted queue if they're in the store and check-[file|directory]
    returns FALSE.

 src/libtracker-miner/tracker-miner-fs.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index a57454c..4d6afa5 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -2494,6 +2494,16 @@ should_process_file (TrackerMinerFS *fs,
                      gboolean        is_dir)
 {
 	if (!should_check_file (fs, file, is_dir)) {
+		ensure_mtime_cache (fs, file);
+
+		if (g_hash_table_lookup (fs->private->mtime_cache, file) != NULL) {
+			/* File is told not to be checked, but exists
+			 * in the store, put in deleted queue.
+			 */
+			g_queue_push_tail (fs->private->items_deleted,
+					   g_object_ref (file));
+		}
+
 		return FALSE;
 	}
 
@@ -2730,6 +2740,17 @@ crawler_check_directory_cb (TrackerCrawler *crawler,
 	if (!should_check) {
 		/* Remove monitors if any */
 		tracker_monitor_remove (fs->private->monitor, file);
+
+		/* Put item in deleted queue if it existed in the store */
+		ensure_mtime_cache (fs, file);
+
+		if (g_hash_table_lookup (fs->private->mtime_cache, file) != NULL) {
+			/* File is told not to be checked, but exists
+			 * in the store, put in deleted queue.
+			 */
+			g_queue_push_tail (fs->private->items_deleted,
+					   g_object_ref (file));
+		}
 	} else {
                 gboolean should_change_index;
 



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