Convert filename to UTF-8 before using it in the error message. (#146054,

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)
This commit is contained in:
Matthias Clasen 2004-07-09 13:05:40 +00:00 committed by Matthias Clasen
parent 86f178d04c
commit 123471fa80
6 changed files with 36 additions and 1 deletions

View 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

View 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

View 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

View 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

View 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

View 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;
}