[tracker/miner-fs-refactor] libtracker-miner: Handle correctly crawling on just created dirs



commit 1ee3c985ae386734ca67e79f647744ae7368efcc
Author: Carlos Garnacho <carlos lanedo com>
Date:   Thu Oct 20 15:28:19 2011 +0200

    libtracker-miner: Handle correctly crawling on just created dirs
    
    The crawler check was wrong for directories added due to a monitor
    created event, so ensure harder that we're dealing with a config
    root instead of some random dir.

 src/libtracker-miner/tracker-file-notifier.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index b2d67eb..3c433c8 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -149,7 +149,8 @@ crawler_check_directory_cb (TrackerCrawler *crawler,
 	 */
 	root = tracker_indexing_tree_get_root (priv->indexing_tree, directory, NULL);
 
-	if (root != priv->pending_index_roots->data) {
+	if (root == directory &&
+	    root != priv->pending_index_roots->data) {
 		return FALSE;
 	}
 
@@ -398,7 +399,8 @@ sparql_file_query_populate (TrackerFileNotifier *notifier,
 			 */
 			root = tracker_indexing_tree_get_root (priv->indexing_tree, file, NULL);
 
-			if (root != priv->pending_index_roots->data) {
+			if (root == file &&
+			    root != priv->pending_index_roots->data) {
 				g_object_unref (file);
 				continue;
 			}



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