[tracker/miner-fs-refactor: 99/101] tracker-miner-fs: Remove the preserve flag if a dir is removed from config
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-fs-refactor: 99/101] tracker-miner-fs: Remove the preserve flag if a dir is removed from config
- Date: Thu, 20 Oct 2011 12:23:53 +0000 (UTC)
commit 52a79cb9ac7236e2ea3efacc49c99f64f0da18eb
Author: Carlos Garnacho <carlos lanedo com>
Date: Thu Oct 20 13:55:48 2011 +0200
tracker-miner-fs: Remove the preserve flag if a dir is removed from config
We don't want to know anymore about that directory, even if it happened
to be within a mount point
src/miners/fs/tracker-miner-files.c | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index 44a8491..01424dc 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -1629,16 +1629,32 @@ update_directories_from_new_config (TrackerMinerFS *mf,
g_message (" Removing directory: '%s'", path);
+ file = g_file_new_for_path (path);
+
+ /* First, remove the preserve flag, it might be
+ * set on configuration directories within mount
+ * points, as data should be persistent across
+ * unmounts.
+ */
+ tracker_indexing_tree_get_root (indexing_tree,
+ file, &flags);
+
+ if ((flags & TRACKER_DIRECTORY_FLAG_PRESERVE) != 0) {
+ flags &= ~(TRACKER_DIRECTORY_FLAG_PRESERVE);
+ tracker_indexing_tree_add (indexing_tree,
+ file, flags);
+ }
+
/* Fully remove item (monitors and from store),
- * directories from configuration do not have the
- * preserve flag set.
+ * now that there's no preserve flag.
*/
- file = g_file_new_for_path (path);
tracker_indexing_tree_remove (indexing_tree, file);
g_object_unref (file);
}
}
+ flags = TRACKER_DIRECTORY_FLAG_NONE;
+
if (recurse) {
flags |= TRACKER_DIRECTORY_FLAG_RECURSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]