From 66be7616ea5a1f7eec00f2bb48cda454ebaa5177 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 20 Aug 2010 15:50:49 +0200 Subject: TrackerMinerFS: Do not index dirs inconditionally when adding monitors. --- src/libtracker-miner/tracker-miner-fs.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c index a7ec68b09..82bd05530 100644 --- a/src/libtracker-miner/tracker-miner-fs.c +++ b/src/libtracker-miner/tracker-miner-fs.c @@ -2937,12 +2937,14 @@ crawler_check_directory_contents_cb (TrackerCrawler *crawler, * the finished sig? */ if (add_monitor) { - /* Before adding the monitor, start notifying the store - * about the new directory, so that if any file event comes - * afterwards, the directory is already in store. */ - g_queue_push_tail (fs->private->items_created, - g_object_ref (parent)); - item_queue_handlers_set_up (fs); + if (!item_query_exists (fs, parent, NULL, NULL)) { + /* Before adding the monitor, start notifying the store + * about the new directory, so that if any file event comes + * afterwards, the directory is already in store. */ + g_queue_push_tail (fs->private->items_created, + g_object_ref (parent)); + item_queue_handlers_set_up (fs); + } /* As we already added here, specify that it shouldn't be added * any more */ -- cgit v1.2.1