aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-03-27 13:21:47 +0800
committerDan Winship <danw@src.gnome.org>2001-03-27 13:21:47 +0800
commit6b7d4b656884f9f5e9372d11bc6b2278f48a1cb7 (patch)
treea8410cd47c7dfd2dd2be13f9e647e8094ce6dbfa /camel/providers
parent60efd7f1824563af66695574d26d1aad4f54fe0a (diff)
downloadgsoc2013-evolution-6b7d4b656884f9f5e9372d11bc6b2278f48a1cb7.tar
gsoc2013-evolution-6b7d4b656884f9f5e9372d11bc6b2278f48a1cb7.tar.gz
gsoc2013-evolution-6b7d4b656884f9f5e9372d11bc6b2278f48a1cb7.tar.bz2
gsoc2013-evolution-6b7d4b656884f9f5e9372d11bc6b2278f48a1cb7.tar.lz
gsoc2013-evolution-6b7d4b656884f9f5e9372d11bc6b2278f48a1cb7.tar.xz
gsoc2013-evolution-6b7d4b656884f9f5e9372d11bc6b2278f48a1cb7.tar.zst
gsoc2013-evolution-6b7d4b656884f9f5e9372d11bc6b2278f48a1cb7.zip
Rewrite to use imap_store->namespace, not service->url->path
* providers/imap/camel-imap-folder.c (imap_get_full_name): Rewrite to use imap_store->namespace, not service->url->path svn path=/trunk/; revision=8966
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/imap/camel-imap-folder.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 2b9bfb7b78..84df6c0321 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -607,16 +607,20 @@ imap_expunge (CamelFolder *folder, CamelException *ex)
static const char *
imap_get_full_name (CamelFolder *folder)
{
- CamelURL *url = ((CamelService *)folder->parent_store)->url;
+ CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
+ char *name;
int len;
- if (!url->path || !*url->path || !strcmp (url->path, "/"))
- return folder->full_name;
- len = strlen (url->path + 1);
- if (!strncmp (url->path + 1, folder->full_name, len) &&
- strlen (folder->full_name) > len + 1)
- return folder->full_name + len + 1;
- return folder->full_name;
+ name = folder->full_name;
+ if (store->namespace && *store->namespace) {
+ len = strlen (store->namespace);
+ if (!strncmp (store->namespace, folder->full_name, len) &&
+ strlen (folder->full_name) > len)
+ name += len;
+ if (*name == store->dir_sep)
+ name++;
+ }
+ return name;
}
static void