summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2010-08-20 15:50:49 +0200
committerMartyn Russell <martyn@lanedo.com>2010-09-02 13:54:37 +0100
commit66be7616ea5a1f7eec00f2bb48cda454ebaa5177 (patch)
tree05254964c101e011640e697038d382112b9cb41f
parent033b63512a03df202b7659a41ce6951caec3f455 (diff)
downloadtracker-66be7616ea5a1f7eec00f2bb48cda454ebaa5177.tar.gz
TrackerMinerFS: Do not index dirs inconditionally when adding monitors.
-rw-r--r--src/libtracker-miner/tracker-miner-fs.c14
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 */