[tracker/rss-enclosures] TrackerMinerFS: Do not index dirs inconditionally when adding monitors.



commit 57398c74e13053a2a1e4700ff1501d1ced9d333b
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Aug 20 15:50:49 2010 +0200

    TrackerMinerFS: Do not index dirs inconditionally when adding monitors.

 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 cc980b6..395e810 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -3022,12 +3022,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 */



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