[evolution] Bug #649939 - Cann't create new folder (second shot)
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #649939 - Cann't create new folder (second shot)
- Date: Wed, 11 May 2011 15:39:52 +0000 (UTC)
commit f9a3112069857536ec14921746f506ffae5bd64d
Author: Milan Crha <mcrha redhat com>
Date: Wed May 11 17:38:16 2011 +0200
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.
mail/e-mail-folder-utils.c | 9 +++++++--
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 6332e9c..f6c295d 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 1a80d79..c13337b 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]