[tracker/miner-web: 12/77] libtracker-miner: Don't add mount points if the UUID is NULL



commit fc93f167459f219011c6e84ed20f3f0f5f6b2ba8
Author: Martyn Russell <martyn lanedo com>
Date:   Tue Feb 23 16:14:26 2010 +0000

    libtracker-miner: Don't add mount points if the UUID is NULL

 src/libtracker-miner/tracker-storage.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-storage.c b/src/libtracker-miner/tracker-storage.c
index 6f5cdee..02caf75 100644
--- a/src/libtracker-miner/tracker-storage.c
+++ b/src/libtracker-miner/tracker-storage.c
@@ -456,7 +456,13 @@ mount_added_cb (GVolumeMonitor *monitor,
 	           uuid,
 	           mount_point);
 
-	mount_add (storage, uuid, mount_point, removable_device);
+	/* We don't have a UUID for CDROMs */
+	if (uuid) {
+		g_message ("  Being added as a tracker resource to index!");
+		mount_add (storage, uuid, mount_point, removable_device);
+	} else {
+		g_message ("  Being ignored because we have no UUID");
+	}
 
 	g_free (mount_point);
 	g_object_unref (file);



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