[tracker] libtracker-miner: Call check_directory() on root dir to crawl
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-miner: Call check_directory() on root dir to crawl
- Date: Thu, 8 May 2014 23:03:59 +0000 (UTC)
commit 7f33518268d890c7e03203f8e2ddb3439607198a
Author: Martyn Russell <martyn lanedo com>
Date: Thu May 8 15:46:50 2014 +0100
libtracker-miner: Call check_directory() on root dir to crawl
Unit tests were failing, pre-release because the count of directories we
notify about finding was 1 less than we expected.
src/libtracker-miner/tracker-crawler.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-crawler.c b/src/libtracker-miner/tracker-crawler.c
index d4a1dba..20d29dc 100644
--- a/src/libtracker-miner/tracker-crawler.c
+++ b/src/libtracker-miner/tracker-crawler.c
@@ -866,8 +866,20 @@ tracker_crawler_start (TrackerCrawler *crawler,
priv->is_finished = FALSE;
info = directory_root_info_new (file, max_depth, priv->file_attributes);
- g_queue_push_tail (priv->directories, info);
+ if (!check_directory (crawler, info, file)) {
+ directory_root_info_free (info);
+
+ g_timer_destroy (priv->timer);
+ priv->timer = NULL;
+
+ priv->is_running = FALSE;
+ priv->is_finished = TRUE;
+
+ return FALSE;
+ }
+
+ g_queue_push_tail (priv->directories, info);
process_func_start (crawler);
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]