[tracker] 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] libtracker-miner: Do not perform removed files check if crawling was cancelled.
- Date: Mon, 23 May 2011 15:34:41 +0000 (UTC)
commit 08163db269d56d49e163f7ab1a687943717d1f0c
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 01ad44a..0241241 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -3904,8 +3904,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]