[tracker/rss-enclosures] libtracker-miner: don't consider shadowed GMounts



commit 737947cc0d22d6a9846cada615710b22ae096aa3
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Mon Jun 14 11:09:00 2010 +0200

    libtracker-miner: don't consider shadowed GMounts

 src/libtracker-miner/tracker-storage.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-storage.c b/src/libtracker-miner/tracker-storage.c
index a7f597f..4813773 100644
--- a/src/libtracker-miner/tracker-storage.c
+++ b/src/libtracker-miner/tracker-storage.c
@@ -430,11 +430,18 @@ mount_add (TrackerStorage *storage,
 	g_return_if_fail (storage);
 	g_return_if_fail (mount);
 
-	priv = TRACKER_STORAGE_GET_PRIVATE (storage);
-
 	/* Get mount name */
 	mount_name = g_mount_get_name (mount);
 
+	/* Do not process shadowed mounts! */
+	if (g_mount_is_shadowed (mount)) {
+		g_debug ("Skipping shadowed mount '%s'", mount_name);
+		g_free (mount_name);
+		return;
+	}
+
+	priv = TRACKER_STORAGE_GET_PRIVATE (storage);
+
 	/* Get root path of the mount */
 	root = g_mount_get_root (mount);
 	mount_path = g_file_get_path (root);



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