diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-11-07 23:20:32 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-11-07 23:20:32 +0000 |
commit | 933af061e195665a0187f1299a151f8484c2cb0b (patch) | |
tree | 7cb4ab72234cf522b828ed8c6198de212b5ef278 /gtk | |
parent | d2caca5e20afee7885eeab51791ef1e38cbe229e (diff) | |
download | gdk-pixbuf-933af061e195665a0187f1299a151f8484c2cb0b.tar.gz |
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)
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkfilesel.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c index 1d17af5e1..6ef064431 100644 --- a/gtk/gtkfilesel.c +++ b/gtk/gtkfilesel.c @@ -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; } |