[tracker/miner-fs-refactor: 74/110] libtracker-miner: Stop crawler if it matches a config dir being removed



commit 22f62bbe7720838fb32adfa758ddc9193503d759
Author: Carlos Garnacho <carlos lanedo com>
Date:   Tue Oct 4 12:47:41 2011 +0200

    libtracker-miner: Stop crawler if it matches a config dir being removed

 src/libtracker-miner/tracker-file-notifier.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index 26a528e..841bec9 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -978,6 +978,16 @@ indexing_tree_directory_removed (TrackerIndexingTree *indexing_tree,
 		g_signal_emit (notifier, signals[FILE_DELETED], 0, directory);
 	}
 
+	if (directory == priv->pending_index_roots->data) {
+		/* Directory being currently processed */
+		tracker_crawler_stop (priv->crawler);
+
+		/* Remove index root and try the next one */
+		priv->pending_index_roots = g_list_remove_link (priv->pending_index_roots,
+								priv->pending_index_roots);
+		crawl_directories_start (notifier);
+	}
+
 	/* Remove monitors if any */
 	tracker_monitor_remove_recursively (priv->monitor, directory);
 }



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