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



commit 6c5885a9b20189270aa41b65d536aa8edb82af7e
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 c1ba4e1..828d08e 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -2451,6 +2451,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;
 	}
 
@@ -2681,6 +2691,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]