[evolution-data-server] Bug #679219 - IMAP+ fails to show newly created top-level folders
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug #679219 - IMAP+ fails to show newly created top-level folders
- Date: Mon, 10 Sep 2012 16:18:18 +0000 (UTC)
commit 425e23f7cde41e3fb5cdf53442a59d5e8f241715
Author: Milan Crha <mcrha redhat com>
Date: Mon Sep 10 18:17:55 2012 +0200
Bug #679219 - IMAP+ fails to show newly created top-level folders
camel/camel-imapx-store-summary.c | 4 +++-
camel/camel-imapx-store.c | 11 +++++++++++
2 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/camel/camel-imapx-store-summary.c b/camel/camel-imapx-store-summary.c
index 96889fb..4fa7549 100644
--- a/camel/camel-imapx-store-summary.c
+++ b/camel/camel-imapx-store-summary.c
@@ -124,12 +124,14 @@ camel_imapx_store_summary_full_name (CamelIMAPXStoreSummary *s,
{
gint count, i;
CamelIMAPXStoreInfo *info;
+ gboolean is_inbox = g_ascii_strcasecmp (full_name, "INBOX") == 0;
count = camel_store_summary_count ((CamelStoreSummary *) s);
for (i = 0; i < count; i++) {
info = (CamelIMAPXStoreInfo *) camel_store_summary_index ((CamelStoreSummary *) s, i);
if (info) {
- if (strcmp (info->full_name, full_name) == 0)
+ if (strcmp (info->full_name, full_name) == 0 ||
+ (is_inbox && g_ascii_strcasecmp (info->full_name, full_name) == 0))
return info;
camel_store_summary_info_free ((CamelStoreSummary *) s, (CamelStoreInfo *) info);
}
diff --git a/camel/camel-imapx-store.c b/camel/camel-imapx-store.c
index 02f56fa..933856c 100644
--- a/camel/camel-imapx-store.c
+++ b/camel/camel-imapx-store.c
@@ -323,6 +323,8 @@ get_folder_offline (CamelStore *store,
user_cache_dir = camel_service_get_user_cache_dir (service);
si = camel_store_summary_path ((CamelStoreSummary *) imapx_store->summary, folder_name);
+ if (!si && g_ascii_strcasecmp (folder_name, "INBOX") == 0)
+ si = (CamelStoreInfo *) camel_imapx_store_summary_full_name (imapx_store->summary, folder_name);
if (si) {
gchar *folder_dir, *storage_path;
@@ -562,6 +564,9 @@ imapx_subscribe_folder (CamelStore *store,
if (!server)
return FALSE;
+ if (folder_name && *folder_name == '/')
+ folder_name++;
+
success = camel_imapx_server_manage_subscription (
server, folder_name, TRUE, cancellable, error);
g_object_unref (server);
@@ -590,6 +595,9 @@ imapx_unsubscribe_folder (CamelStore *store,
if (!server)
return FALSE;
+ if (folder_name && *folder_name == '/')
+ folder_name++;
+
success = camel_imapx_server_manage_subscription (
server, folder_name, FALSE, cancellable, error);
g_object_unref (server);
@@ -1708,6 +1716,9 @@ imapx_store_folder_is_subscribed (CamelSubscribable *subscribable,
CamelStoreInfo *si;
gint is_subscribed = FALSE;
+ if (folder_name && *folder_name == '/')
+ folder_name++;
+
si = camel_store_summary_path ((CamelStoreSummary *) istore->summary, folder_name);
if (si) {
is_subscribed = (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) != 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]