Commit 6b7d4b65 authored by Dan Winship's avatar Dan Winship

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
parent 60efd7f1
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment