diff options
author | Milan Crha <mcrha@redhat.com> | 2011-05-11 23:38:16 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:42:12 +0800 |
commit | 6049045e1ff9e076df1a0a892368f902617423af (patch) | |
tree | 72424083a443df6383350b26b076c70bfbec9d8e | |
parent | 43ccbdd2a56d64a70fb30a13b42c25f394ce7cb2 (diff) | |
download | gsoc2013-evolution-6049045e1ff9e076df1a0a892368f902617423af.tar.gz gsoc2013-evolution-6049045e1ff9e076df1a0a892368f902617423af.tar.zst gsoc2013-evolution-6049045e1ff9e076df1a0a892368f902617423af.zip |
Bug #649939 - Cann't create new folder (second shot)
The previous patch worked for local account only, for anything
which has '@' in account's UID it still failed.
-rw-r--r-- | mail/e-mail-folder-utils.c | 9 | ||||
-rw-r--r-- | mail/em-folder-utils.c | 6 |
2 files changed, 12 insertions, 3 deletions
diff --git a/mail/e-mail-folder-utils.c b/mail/e-mail-folder-utils.c index 6332e9c1ae..f6c295d040 100644 --- a/mail/e-mail-folder-utils.c +++ b/mail/e-mail-folder-utils.c @@ -248,8 +248,13 @@ e_mail_folder_uri_parse (CamelSession *session, if (g_strcmp0 (url->protocol, "folder") == 0) { if (url->host != NULL) { - gchar *uid = g_strdup (url->host); - camel_url_decode (uid); + gchar *uid; + + if (!url->user || !*url->user) + uid = g_strdup (url->host); + else + uid = g_strconcat (url->user, "@", url->host, NULL); + service = camel_session_get_service (session, uid); g_free (uid); } diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c index 1a80d79ccb..c13337bf68 100644 --- a/mail/em-folder-utils.c +++ b/mail/em-folder-utils.c @@ -723,6 +723,7 @@ emfu_popup_new_folder_response (EMFolderSelector *emfs, const gchar *uri, *path; CamelStore *store = NULL; struct _EMCreateFolderTempData *emcftd; + GError *error = NULL; if (response != GTK_RESPONSE_OK) { gtk_widget_destroy ((GtkWidget *) emfs); @@ -736,7 +737,10 @@ emfu_popup_new_folder_response (EMFolderSelector *emfs, session = em_folder_tree_get_session (folder_tree); - if (!e_mail_folder_uri_parse (CAMEL_SESSION (session), uri, &store, NULL, NULL)) { + if (!e_mail_folder_uri_parse (CAMEL_SESSION (session), uri, &store, NULL, &error)) { + g_warning ("%s: Failed to parse folder uri: %s", G_STRFUNC, error ? error->message : "Unknown error"); + if (error) + g_error_free (error); return; } |