Escape invalid filename before printing it out, since it isn't a valid

Thu Nov  7 18:09:42 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkfilesel.c (open_new_dir): Escape invalid
        filename before printing it out, since it isn't
        a valid UTF-8 string. (#94676)
This commit is contained in:
Owen Taylor 2002-11-07 23:20:32 +00:00 committed by Owen Taylor
parent d2caca5e20
commit 933af061e1
7 changed files with 39 additions and 1 deletions

View File

@ -1,3 +1,9 @@
Thu Nov 7 18:09:42 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (open_new_dir): Escape invalid
filename before printing it out, since it isn't
a valid UTF-8 string. (#94676)
Thu Nov 7 17:18:06 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_pixbuf):

View File

@ -1,3 +1,9 @@
Thu Nov 7 18:09:42 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (open_new_dir): Escape invalid
filename before printing it out, since it isn't
a valid UTF-8 string. (#94676)
Thu Nov 7 17:18:06 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_pixbuf):

View File

@ -1,3 +1,9 @@
Thu Nov 7 18:09:42 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (open_new_dir): Escape invalid
filename before printing it out, since it isn't
a valid UTF-8 string. (#94676)
Thu Nov 7 17:18:06 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_pixbuf):

View File

@ -1,3 +1,9 @@
Thu Nov 7 18:09:42 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (open_new_dir): Escape invalid
filename before printing it out, since it isn't
a valid UTF-8 string. (#94676)
Thu Nov 7 17:18:06 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_pixbuf):

View File

@ -1,3 +1,9 @@
Thu Nov 7 18:09:42 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (open_new_dir): Escape invalid
filename before printing it out, since it isn't
a valid UTF-8 string. (#94676)
Thu Nov 7 17:18:06 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_pixbuf):

View File

@ -1,3 +1,9 @@
Thu Nov 7 18:09:42 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (open_new_dir): Escape invalid
filename before printing it out, since it isn't
a valid UTF-8 string. (#94676)
Thu Nov 7 17:18:06 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_pixbuf):

View File

@ -3071,10 +3071,12 @@ open_new_dir (gchar *dir_name,
if (sent->entries[n_entries].entry_name == NULL
|| !g_utf8_validate (sent->entries[n_entries].entry_name, -1, NULL))
{
gchar *escaped_str = g_strescape (dirent, NULL);
g_message (_("The filename \"%s\" couldn't be converted to UTF-8 "
"(try setting the environment variable G_BROKEN_FILENAMES): %s"),
dirent,
escaped_str,
error->message ? error->message : _("Invalid Utf-8"));
g_free (escaped_str);
g_clear_error (&error);
continue;
}