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



commit 0538b046edda3fc9b3754318c18cad7d9addf87f
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]