[tracker/miner-fs-rename-directory-to-hidden-name] libtracker-miner: don't print paths, which may not be UTF-8, print uris



commit 79044685f07b569301a8488cf1a49868cc93b282
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Tue Dec 14 13:26:47 2010 +0100

    libtracker-miner: don't print paths, which may not be UTF-8, print uris

 src/libtracker-miner/tracker-miner-fs.c |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index b4f609e..904ade7 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -3107,33 +3107,33 @@ monitor_item_moved_cb (TrackerMonitor *monitor,
 			tracker_monitor_remove_recursively (fs->private->monitor,
 			                                    file);
 			if (should_recurse_for_directory (fs, other_file)) {
-				gchar *path;
+				gchar *uri;
 
-				path = g_file_get_path (other_file);
+				uri = g_file_get_uri (other_file);
 				g_debug ("Not in store:'?'->'%s' (DIR) "
 				         "(move monitor event, source unknown)",
-				         path);
+				         uri);
 				/* If the source is not monitored, we need to crawl it. */
 				tracker_miner_fs_directory_add_internal (fs, other_file);
-				g_free (path);
+				g_free (uri);
 			}
 		}
 		/* else, file, do nothing */
 	} else {
-		gchar *path;
-		gchar *other_path;
+		gchar *uri;
+		gchar *other_uri;
 		gboolean source_stored, should_process_other;
 
-		path = g_file_get_path (file);
-		other_path = g_file_get_path (other_file);
+		uri = g_file_get_uri (file);
+		other_uri = g_file_get_uri (other_file);
 
 		source_stored = item_query_exists (fs, file, NULL, NULL);
 		should_process_other = should_check_file (fs, other_file, is_directory);
 
 		g_debug ("%s:'%s'->'%s':%s (%s) (move monitor event or user request)",
 		         source_stored ? "In store" : "Not in store",
-		         path,
-		         other_path,
+		         uri,
+		         other_uri,
 		         should_process_other ? "Found " : "Ignored",
 		         is_directory ? "DIR" : "FILE");
 
@@ -3161,7 +3161,7 @@ monitor_item_moved_cb (TrackerMonitor *monitor,
 				} else {
 					g_debug ("Not in store:'?'->'%s' (DIR) "
 					         "(move monitor event, source monitored)",
-					         path);
+					         uri);
 					tracker_miner_fs_directory_add_internal (fs, other_file);
 				}
 			}
@@ -3190,8 +3190,8 @@ monitor_item_moved_cb (TrackerMonitor *monitor,
 			item_queue_handlers_set_up (fs);
 		}
 
-		g_free (other_path);
-		g_free (path);
+		g_free (other_uri);
+		g_free (uri);
 	}
 }
 



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