[tracker/miner-fs-refactor: 5/110] libtracker-miner: overwrite flags when adding same path to the indexing tree



commit 692001a8fd5a4f9206e4672de76ee1235251579c
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Wed Aug 3 09:33:48 2011 +0200

    libtracker-miner: overwrite flags when adding same path to the indexing tree

 src/libtracker-miner/tracker-indexing-tree.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-indexing-tree.c b/src/libtracker-miner/tracker-indexing-tree.c
index a372169..1901441 100644
--- a/src/libtracker-miner/tracker-indexing-tree.c
+++ b/src/libtracker-miner/tracker-indexing-tree.c
@@ -243,6 +243,17 @@ tracker_indexing_tree_add (TrackerIndexingTree   *tree,
 		/* Node already existed */
 		data = node->data;
 		data->shallow = FALSE;
+
+		/* Overwrite flags if they are different */
+		if (data->flags != flags) {
+			gchar *uri;
+
+			uri = g_file_get_uri (directory);
+			g_warning ("Overwriting flags for directory '%s'", uri);
+			g_free (uri);
+
+			data->flags = flags;
+		}
 		return;
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]