mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
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:
parent
86f178d04c
commit
123471fa80
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user