diff options
author | Milan Crha <mcrha@src.gnome.org> | 2007-08-20 15:11:31 +0800 |
---|---|---|
committer | Milan Crha <mcrha@src.gnome.org> | 2007-08-20 15:11:31 +0800 |
commit | e3bc9c823718c769c9667b9f707fdabf0d8f0697 (patch) | |
tree | c3ba81a3e0baaf7f04563033d26c7fafe4d114b4 /mail | |
parent | 37f9a781d6ef656ddfca1359ee524a4c3fa9b531 (diff) | |
download | gsoc2013-evolution-e3bc9c823718c769c9667b9f707fdabf0d8f0697.tar.gz gsoc2013-evolution-e3bc9c823718c769c9667b9f707fdabf0d8f0697.tar.zst gsoc2013-evolution-e3bc9c823718c769c9667b9f707fdabf0d8f0697.zip |
2007-08-20 mcrha Fix for bug #367760
svn path=/trunk/; revision=34042
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 9 | ||||
-rw-r--r-- | mail/em-utils.c | 14 |
2 files changed, 18 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 62e070be6b..308e2688e5 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,12 @@ +2007-08-20 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #367760 + + * em-utils.c: (em_filename_make_safe): Added '#' as non-safe character. + * em-utils.c: (em_utils_save_part): Using em_filename_make_safe and + creates filename similar to em_utils_save_parts. + * em-utils.c: (em_utils_save_parts): Using em_filename_make_safe. + 2007-08-20 Johnny Jacob <jjohnny@novell.com> ** Fix for bug #467599. diff --git a/mail/em-utils.c b/mail/em-utils.c index adf0f839ce..6a9762f02b 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -328,9 +328,9 @@ em_filename_make_safe (gchar *string) gchar *p, *ts; gunichar c; #ifdef G_OS_WIN32 - const char *unsafe_chars = "/\":*?<>|\\"; + const char *unsafe_chars = "/\":*?<>|\\#"; #else - const char *unsafe_chars = "/"; + const char *unsafe_chars = "/#"; #endif g_return_if_fail (string != NULL); @@ -385,10 +385,12 @@ void em_utils_save_part (GtkWidget *parent, const char *prompt, CamelMimePart *part) { GtkWidget *file_chooser; - const gchar *filename; - gchar *uri = NULL; + const gchar *utf8_filename; + gchar *uri = NULL, *filename; - filename = emu_save_get_filename_for_part (part); + utf8_filename = emu_save_get_filename_for_part (part); + filename = g_filename_from_utf8 (utf8_filename, -1, NULL, NULL, NULL); + em_filename_make_safe (filename); file_chooser = e_file_get_save_filesel ( parent, prompt, filename, GTK_FILE_CHOOSER_ACTION_SAVE); @@ -413,6 +415,7 @@ em_utils_save_part (GtkWidget *parent, const char *prompt, CamelMimePart *part) exit: gtk_widget_destroy (file_chooser); g_free (uri); + g_free (filename); } void @@ -439,6 +442,7 @@ em_utils_save_parts (GtkWidget *parent, const gchar *prompt, GSList *parts) utf8_filename = emu_save_get_filename_for_part (part); filename = g_filename_from_utf8 (utf8_filename, -1, NULL, NULL, NULL); + em_filename_make_safe (filename); uri = g_build_path ("/", path_uri, filename, NULL); g_free (filename); |