[tracker/tracker-0.8] libtracker-miner: Print uri always instead of path, as path may not be UTF-8



commit 1a5235bcab646d57e962156ac1f9f826e2b6a568
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Thu Aug 5 16:39:00 2010 +0200

    libtracker-miner: Print uri always instead of path, as path may not be UTF-8

 src/libtracker-miner/tracker-miner-fs.c |   25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 2cdd6df..30232b8 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -2628,16 +2628,16 @@ monitor_item_created_cb (TrackerMonitor *monitor,
 {
 	TrackerMinerFS *fs;
 	gboolean should_process = TRUE;
-	gchar *path;
+	gchar *uri;
 
 	fs = user_data;
 	should_process = should_check_file (fs, file, is_directory);
 
-	path = g_file_get_path (file);
+	uri = g_file_get_uri (file);
 
 	g_debug ("%s:'%s' (%s) (create monitor event or user request)",
 	         should_process ? "Found " : "Ignored",
-	         path,
+	         uri,
 	         is_directory ? "DIR" : "FILE");
 
 	if (should_process) {
@@ -2652,7 +2652,7 @@ monitor_item_created_cb (TrackerMonitor *monitor,
 		}
 	}
 
-	g_free (path);
+	g_free (uri);
 }
 
 static void
@@ -2663,16 +2663,16 @@ monitor_item_updated_cb (TrackerMonitor *monitor,
 {
 	TrackerMinerFS *fs;
 	gboolean should_process;
-	gchar *path;
+	gchar *uri;
 
 	fs = user_data;
 	should_process = should_check_file (fs, file, is_directory);
 
-	path = g_file_get_path (file);
+	uri = g_file_get_uri (file);
 
 	g_debug ("%s:'%s' (%s) (update monitor event or user request)",
 	         should_process ? "Found " : "Ignored",
-	         path,
+	         uri,
 	         is_directory ? "DIR" : "FILE");
 
 	if (should_process) {
@@ -2682,7 +2682,7 @@ monitor_item_updated_cb (TrackerMonitor *monitor,
 		item_queue_handlers_set_up (fs);
 	}
 
-	g_free (path);
+	g_free (uri);
 }
 
 static void
@@ -2693,15 +2693,16 @@ monitor_item_deleted_cb (TrackerMonitor *monitor,
 {
 	TrackerMinerFS *fs;
 	gboolean should_process;
-	gchar *path;
+	gchar *uri;
 
 	fs = user_data;
 	should_process = should_check_file (fs, file, is_directory);
-	path = g_file_get_path (file);
+
+	uri = g_file_get_uri (file);
 
 	g_debug ("%s:'%s' (%s) (delete monitor event or user request)",
 	         should_process ? "Found " : "Ignored",
-	         path,
+	         uri,
 	         is_directory ? "DIR" : "FILE");
 
 	if (should_process) {
@@ -2732,7 +2733,7 @@ monitor_item_deleted_cb (TrackerMonitor *monitor,
 	}
 #endif
 
-	g_free (path);
+	g_free (uri);
 }
 
 static void



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