[tracker] Fix tracker-miner-fs exiting on non-UTF8 locale (GNOME bug #616535)
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] Fix tracker-miner-fs exiting on non-UTF8 locale (GNOME bug #616535)
- Date: Thu, 20 May 2010 08:16:46 +0000 (UTC)
commit b9e9d9d1d0f76ee7eec603e363a8f97341d85735
Author: Frederic Crozat <fcrozat mandriva com>
Date: Thu May 20 09:16:08 2010 +0100
Fix tracker-miner-fs exiting on non-UTF8 locale (GNOME bug #616535)
src/libtracker-miner/tracker-miner-fs.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index dce63ca..6bf2a0c 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -2706,7 +2706,7 @@ static gboolean
crawl_directories_cb (gpointer user_data)
{
TrackerMinerFS *fs = user_data;
- gchar *path;
+ gchar *path, *path_utf8;
gchar *str;
if (fs->private->current_directory) {
@@ -2733,12 +2733,15 @@ crawl_directories_cb (gpointer user_data)
fs->private->current_directory);
path = g_file_get_path (fs->private->current_directory->file);
+ path_utf8 = g_filename_to_utf8 (path, -1, NULL, NULL, NULL);
+ g_free (path);
if (fs->private->current_directory->recurse) {
- str = g_strdup_printf ("Crawling recursively directory '%s'", path);
+ str = g_strdup_printf ("Crawling recursively directory '%s'", path_utf8);
} else {
- str = g_strdup_printf ("Crawling single directory '%s'", path);
+ str = g_strdup_printf ("Crawling single directory '%s'", path_utf8);
}
+ g_free (path_utf8);
g_message ("%s", str);
@@ -2748,7 +2751,6 @@ crawl_directories_cb (gpointer user_data)
"status", str,
NULL);
g_free (str);
- g_free (path);
if (tracker_crawler_start (fs->private->crawler,
fs->private->current_directory->file,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]