diff options
author | Dan Winship <danw@src.gnome.org> | 2001-03-27 13:21:47 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-03-27 13:21:47 +0800 |
commit | 6b7d4b656884f9f5e9372d11bc6b2278f48a1cb7 (patch) | |
tree | a8410cd47c7dfd2dd2be13f9e647e8094ce6dbfa | |
parent | 60efd7f1824563af66695574d26d1aad4f54fe0a (diff) | |
download | gsoc2013-evolution-6b7d4b656884f9f5e9372d11bc6b2278f48a1cb7.tar.gz 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
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 20 |
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 |