[tracker] libtracker-miner, storage: Skip mount points without mount path



commit a1351ca60ec62572b07e48e390a1816e0c51f714
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Thu Feb 17 16:58:57 2011 +0100

    libtracker-miner,storage: Skip mount points without mount path

 src/libtracker-miner/tracker-storage.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-storage.c b/src/libtracker-miner/tracker-storage.c
index f97223e..b80ccb6 100644
--- a/src/libtracker-miner/tracker-storage.c
+++ b/src/libtracker-miner/tracker-storage.c
@@ -650,19 +650,25 @@ mount_add (TrackerStorage *storage,
 				g_free (content_type);
 			} else {
 				g_debug ("  Being ignored because mount has no GVolume (i.e. not user mountable) "
-				         "and has mount root path available");
+				         "and has no mount root path available");
 			}
 		}
 	}
 
 	/* If we got something to be used as UUID, then add the mount
 	 * to the TrackerStorage */
-	if (uuid && !g_hash_table_lookup (priv->mounts_by_uuid, uuid)) {
-		g_debug ("  Adding mount point with UUID:'%s', removable: %s, optical: %s",
+	if (uuid && mount_path && !g_hash_table_lookup (priv->mounts_by_uuid, uuid)) {
+		g_debug ("  Adding mount point with UUID: '%s', removable: %s, optical: %s, path: '%s'",
 		         uuid,
 		         is_removable ? "yes" : "no",
-		         is_optical ? "yes" : "no");
+		         is_optical ? "yes" : "no",
+		         mount_path);
 		mount_add_new (storage, uuid, mount_path, is_removable, is_optical);
+	} else {
+		g_debug ("  Skipping mount point with UUID: '%s', path: '%s', already managed: '%s'",
+		         uuid ? uuid : "none",
+		         mount_path ? mount_path : "none",
+		         (uuid && g_hash_table_lookup (priv->mounts_by_uuid, uuid)) ? "yes" : "no");
 	}
 
 	g_free (mount_name);



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