dovecot-2.1: layout=fs, mail_shared_explicit_inbox=no: Fixed lis...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Jul 3 01:56:34 EEST 2012
details: http://hg.dovecot.org/dovecot-2.1/rev/a6d59207d9d6
changeset: 14592:a6d59207d9d6
user: Timo Sirainen <tss at iki.fi>
date: Tue Jul 03 01:52:00 2012 +0300
description:
layout=fs, mail_shared_explicit_inbox=no: Fixed listing nonexistent mailboxes in root.
diffstat:
src/lib-storage/list/mailbox-list-fs-iter.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diffs (26 lines):
diff -r 90270c054e1f -r a6d59207d9d6 src/lib-storage/list/mailbox-list-fs-iter.c
--- a/src/lib-storage/list/mailbox-list-fs-iter.c Tue Jul 03 01:06:24 2012 +0300
+++ b/src/lib-storage/list/mailbox-list-fs-iter.c Tue Jul 03 01:52:00 2012 +0300
@@ -404,10 +404,18 @@
we just want to see its contents (not the
INBOX's children). */
root = "";
- } else if (*prefix_vname == '\0') {
- /* we need to handle "" explicitly here, because getting
- storage name with mail_shared_explicit_inbox=no
- would return root=INBOX. */
+ } else if ((ns->flags & NAMESPACE_FLAG_INBOX_ANY) != 0 &&
+ ns->type == NAMESPACE_SHARED &&
+ !ctx->ctx.list->mail_set->mail_shared_explicit_inbox &&
+ (prefix_vname[0] == '\0' ||
+ (strncmp(ns->prefix, prefix_vname, ns->prefix_len-1) == 0 &&
+ prefix_vname[ns->prefix_len-1] == '\0'))) {
+ /* we need to handle ns prefix explicitly here, because
+ getting storage name with
+ mail_shared_explicit_inbox=no would return
+ root=INBOX. (e.g. LIST "" shared/user/box has to
+ return the box when it doesn't exist but
+ shared/user/box/child exists) */
root = "";
} else {
root = mailbox_list_get_storage_name(ctx->ctx.list,
More information about the dovecot-cvs
mailing list