Mercurial > dovecot > core-2.2
changeset 13207:076673c45e58
lib-storage: Fixes to handling INBOX/ namespace prefix.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 10 Aug 2011 16:00:45 +0300 |
parents | 513ec6bf3fab |
children | e6eaf803ce09 |
files | src/lib-storage/mail-storage.c src/lib-storage/mailbox-list.c |
diffstat | 2 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/mail-storage.c Wed Aug 10 15:17:12 2011 +0300 +++ b/src/lib-storage/mail-storage.c Wed Aug 10 16:00:45 2011 +0300 @@ -632,7 +632,8 @@ return 0; } - if (have_listable_namespace_prefix(box->storage->user->namespaces, + if (!box->inbox_user && + have_listable_namespace_prefix(box->storage->user->namespaces, box->vname)) { /* listable namespace prefix always exists */ *existence_r = MAILBOX_EXISTENCE_NOSELECT;
--- a/src/lib-storage/mailbox-list.c Wed Aug 10 15:17:12 2011 +0300 +++ b/src/lib-storage/mailbox-list.c Wed Aug 10 16:00:45 2011 +0300 @@ -405,7 +405,7 @@ else if (list->set.escape_char != '\0') storage_name = mailbox_list_escape_name(list, vname); - if (prefix_len > 0) { + if (prefix_len > 0 && strcmp(storage_name, "INBOX") != 0) { /* skip namespace prefix, except if this is INBOX */ if (strncmp(ns->prefix, storage_name, prefix_len) == 0) storage_name += prefix_len; @@ -414,8 +414,8 @@ /* trying to access the namespace prefix itself */ storage_name = ""; } else { - /* it's either INBOX, or we're converting a nonexistent - mailbox name, such as a LIST pattern. */ + /* we're converting a nonexistent mailbox name, + such as a LIST pattern. */ } }