[tracker/tracker-0.10] libtracker-miner: Do not perform removed files check if crawling was cancelled.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.10] libtracker-miner: Do not perform removed files check if crawling was cancelled.
- Date: Wed, 25 May 2011 09:15:53 +0000 (UTC)
commit 29aa3b520a55c95edccb49e60d6c6756817ab2df
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon May 23 17:24:06 2011 +0200
libtracker-miner: Do not perform removed files check if crawling was cancelled.
Since the logic is "remove from the hashtable all existing files, so the remainder
can be deleted", there are chances that a file could be left there when crawling is
interrupted.
src/libtracker-miner/tracker-miner-fs.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 98bf6a9..d49583f 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -3892,8 +3892,15 @@ crawler_finished_cb (TrackerCrawler *crawler,
directory_data_unref (fs->private->current_directory);
fs->private->current_directory = NULL;
- /* Check if any file was left after whole crawling */
- check_if_files_removed (fs);
+ if (!was_interrupted) {
+ /* Check if any file was left after whole crawling */
+ check_if_files_removed (fs);
+ } else {
+ /* Ditch files to check for removal, as the crawler was
+ * interrupted, it can lead to false positives.
+ */
+ g_hash_table_remove_all (fs->private->check_removed);
+ }
/* Proceed to next thing to process */
crawl_directories_start (fs);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]