Convert filename to UTF-8 before using it in the error message. (#146054,
authorMatthias Clasen <mclasen@redhat.com>
Fri, 9 Jul 2004 13:05:40 +0000 (13:05 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 9 Jul 2004 13:05:40 +0000 (13:05 +0000)
2004-07-09  Matthias Clasen  <mclasen@redhat.com>

* glib/gdir.c (g_dir_open): Convert filename to UTF-8
before using it in the error message.  (#146054, Federico
Mena Quintero)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/gdir.c

index 0e1f2d8..7f192b2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-07-09  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/gdir.c (g_dir_open): Convert filename to UTF-8 
+       before using it in the error message.  (#146054, Federico
+       Mena Quintero)
+
 Thu Jul  8 00:54:32 2004  Matthias Clasen  <maclas@gmx.de>
 
        * glib/gi18n.h: Remove the ENABLE_NLS check, since GLib can't
index 0e1f2d8..7f192b2 100644 (file)
@@ -1,3 +1,9 @@
+2004-07-09  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/gdir.c (g_dir_open): Convert filename to UTF-8 
+       before using it in the error message.  (#146054, Federico
+       Mena Quintero)
+
 Thu Jul  8 00:54:32 2004  Matthias Clasen  <maclas@gmx.de>
 
        * glib/gi18n.h: Remove the ENABLE_NLS check, since GLib can't
index 0e1f2d8..7f192b2 100644 (file)
@@ -1,3 +1,9 @@
+2004-07-09  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/gdir.c (g_dir_open): Convert filename to UTF-8 
+       before using it in the error message.  (#146054, Federico
+       Mena Quintero)
+
 Thu Jul  8 00:54:32 2004  Matthias Clasen  <maclas@gmx.de>
 
        * glib/gi18n.h: Remove the ENABLE_NLS check, since GLib can't
index 0e1f2d8..7f192b2 100644 (file)
@@ -1,3 +1,9 @@
+2004-07-09  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/gdir.c (g_dir_open): Convert filename to UTF-8 
+       before using it in the error message.  (#146054, Federico
+       Mena Quintero)
+
 Thu Jul  8 00:54:32 2004  Matthias Clasen  <maclas@gmx.de>
 
        * glib/gi18n.h: Remove the ENABLE_NLS check, since GLib can't
index 0e1f2d8..7f192b2 100644 (file)
@@ -1,3 +1,9 @@
+2004-07-09  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/gdir.c (g_dir_open): Convert filename to UTF-8 
+       before using it in the error message.  (#146054, Federico
+       Mena Quintero)
+
 Thu Jul  8 00:54:32 2004  Matthias Clasen  <maclas@gmx.de>
 
        * glib/gi18n.h: Remove the ENABLE_NLS check, since GLib can't
index f926804..c9e011e 100644 (file)
@@ -63,6 +63,7 @@ g_dir_open (const gchar  *path,
             GError      **error)
 {
   GDir *dir;
+  gchar *utf8_path;
 
   g_return_val_if_fail (path != NULL, NULL);
 
@@ -74,13 +75,17 @@ g_dir_open (const gchar  *path,
     return dir;
 
   /* error case */
+  utf8_path = g_filename_to_utf8 (path, -1,
+                                 NULL, NULL, NULL);
   g_set_error (error,
                G_FILE_ERROR,
                g_file_error_from_errno (errno),
                _("Error opening directory '%s': %s"),
-              path, g_strerror (errno));
+              utf8_path, g_strerror (errno));
 
+  g_free (utf8_path);
   g_free (dir);
+
   return NULL;
 }