diff options
-rw-r--r-- | src/libtracker-miner/tracker-miner-fs.c | 14 |
1 files 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 */ |