summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2018-09-09 19:01:24 +0200
committerCarlos Garnacho <carlosg@gnome.org>2018-09-09 19:01:24 +0200
commit1bfeba6c36429d01135b9e6f45c5c1268cf17d5a (patch)
treeb22475ff35f8be376be99defc7a6f5bfc769b43d
parent4b7980b92d15167ae43e79211faf1358c8cbe575 (diff)
downloadtracker-1bfeba6c36429d01135b9e6f45c5c1268cf17d5a.tar.gz
libtracker-miner: Avoid crawling through children of non-recursive dir
The direct children would be crawled, which is pretty useless.
-rw-r--r--src/libtracker-miner/tracker-file-notifier.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index 6d620a74e..eb6475ee1 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -444,7 +444,9 @@ file_notifier_add_node_foreach (GNode *node,
g_object_unref (file_info);
- if (file_type == G_FILE_TYPE_DIRECTORY && !G_NODE_IS_ROOT (node)) {
+ if (file_type == G_FILE_TYPE_DIRECTORY &&
+ (priv->current_index_root->flags & TRACKER_DIRECTORY_FLAG_RECURSE) != 0 &&
+ !G_NODE_IS_ROOT (node)) {
/* Queue child dirs for later processing */
g_assert (node->children == NULL);
g_queue_push_tail (priv->current_index_root->pending_dirs,