[tracker-miners/wip/carlosg/shuffle-libtracker-miner: 83/116] libtracker-miner: Avoid crawling through children of non-recursive dir
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/shuffle-libtracker-miner: 83/116] libtracker-miner: Avoid crawling through children of non-recursive dir
- Date: Sat, 14 Dec 2019 16:21:47 +0000 (UTC)
commit 0ce04b54f31f0d8aab9fc13671bd6ef200309ea2
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Sep 9 19:01:24 2018 +0200
libtracker-miner: Avoid crawling through children of non-recursive dir
The direct children would be crawled, which is pretty useless.
src/libtracker-miner/tracker-file-notifier.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index 108528482..f809f8fea 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]