diff options
author | Dan Vrátil <dvratil@redhat.com> | 2012-04-03 23:56:58 +0800 |
---|---|---|
committer | Dan Vrátil <dvratil@redhat.com> | 2012-04-03 23:56:58 +0800 |
commit | e4c0c101ee54034e1b3a9b1f11eb50d88acb9e66 (patch) | |
tree | e9d56a8744743cad9b8adef4eb9cdc819f85ec9f /em-format/em-format.c | |
parent | 4e2f3534aeac36db1b5ad4f21ec21354eecc9b17 (diff) | |
download | gsoc2013-evolution-e4c0c101ee54034e1b3a9b1f11eb50d88acb9e66.tar gsoc2013-evolution-e4c0c101ee54034e1b3a9b1f11eb50d88acb9e66.tar.gz gsoc2013-evolution-e4c0c101ee54034e1b3a9b1f11eb50d88acb9e66.tar.bz2 gsoc2013-evolution-e4c0c101ee54034e1b3a9b1f11eb50d88acb9e66.tar.lz gsoc2013-evolution-e4c0c101ee54034e1b3a9b1f11eb50d88acb9e66.tar.xz gsoc2013-evolution-e4c0c101ee54034e1b3a9b1f11eb50d88acb9e66.tar.zst gsoc2013-evolution-e4c0c101ee54034e1b3a9b1f11eb50d88acb9e66.zip |
Bug #673430 - Can't read messages in virtual Junk/Trash folders
Diffstat (limited to 'em-format/em-format.c')
-rw-r--r-- | em-format/em-format.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/em-format/em-format.c b/em-format/em-format.c index 071403d785..86fafdd539 100644 --- a/em-format/em-format.c +++ b/em-format/em-format.c @@ -2481,7 +2481,8 @@ em_format_build_mail_uri (CamelFolder *folder, folder_name = "generic"; service_uid = "generic"; } else { - folder_name = camel_folder_get_full_name (folder); + tmp = (gchar *) camel_folder_get_full_name (folder); + folder_name = (const gchar *) soup_uri_encode (tmp, NULL); store = camel_folder_get_parent_store (folder); if (store) service_uid = camel_service_get_uid (CAMEL_SERVICE (store)); @@ -2494,6 +2495,10 @@ em_format_build_mail_uri (CamelFolder *folder, folder_name, message_uid); + if (folder) { + g_free ((gchar *) folder_name); + } + va_start (ap, first_param_name); name = first_param_name; separator = '?'; @@ -2539,14 +2544,15 @@ em_format_build_mail_uri (CamelFolder *folder, va_end (ap); uri = tmp; + if (uri == NULL) + return NULL; /* For some reason, webkit won't accept URL with username, but * without password (mail://store@host/folder/mail), so we * will replace the '@' symbol by '/' to get URL like * mail://store/host/folder/mail which is OK */ - tmp = strchr (tmp, '@'); - if (tmp) { + while ((tmp = strchr (uri, '@')) != NULL) { tmp[0] = '/'; } |