[tracker/miner-fs-refactor: 11/93] libtracker-miner: fix logic to tell whether file is indexable
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-fs-refactor: 11/93] libtracker-miner: fix logic to tell whether file is indexable
- Date: Fri, 7 Oct 2011 09:44:46 +0000 (UTC)
commit 74f03aa71b157f124c44ba093286223a0f3c2cfe
Author: Aleksander Morgado <aleksander lanedo com>
Date: Wed Aug 3 17:06:37 2011 +0200
libtracker-miner: fix logic to tell whether file is indexable
A file is indexable if:
* The exact file was added to be monitored.
* The direct parent directory of the file was added to be monitored.
* The closest configured parent directory was added to be recursively monitored.
src/libtracker-miner/tracker-indexing-tree.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-indexing-tree.c b/src/libtracker-miner/tracker-indexing-tree.c
index 3539f1e..98fc34a 100644
--- a/src/libtracker-miner/tracker-indexing-tree.c
+++ b/src/libtracker-miner/tracker-indexing-tree.c
@@ -518,9 +518,11 @@ tracker_indexing_tree_file_is_indexable (TrackerIndexingTree *tree,
data = parent->data;
- if (!data->shallow &&
- (data->flags & TRACKER_DIRECTORY_FLAG_RECURSE ||
- g_file_has_parent (file, data->file))) {
+ if (!data->shallow &&
+ data->flags & TRACKER_DIRECTORY_FLAG_MONITOR &&
+ (g_file_equal (file, data->file) || /* Exact path being monitored */
+ g_file_has_parent (file, data->file) || /* Direct parent being monitored */
+ data->flags & TRACKER_DIRECTORY_FLAG_RECURSE)) { /* Parent not direct, but recursively monitored */
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]