dovecot-2.1: imapc: List INBOX for inbox=yes namespace even imap...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Apr 25 16:44:32 EEST 2012
details: http://hg.dovecot.org/dovecot-2.1/rev/aba344bb85f3
changeset: 14477:aba344bb85f3
user: Timo Sirainen <tss at iki.fi>
date: Wed Apr 25 16:44:22 2012 +0300
description:
imapc: List INBOX for inbox=yes namespace even imapc_list_prefix is set.
diffstat:
src/lib-storage/index/imapc/imapc-list.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diffs (27 lines):
diff -r e928c1575689 -r aba344bb85f3 src/lib-storage/index/imapc/imapc-list.c
--- a/src/lib-storage/index/imapc/imapc-list.c Wed Apr 25 16:44:00 2012 +0300
+++ b/src/lib-storage/index/imapc/imapc-list.c Wed Apr 25 16:44:22 2012 +0300
@@ -365,6 +365,14 @@
list->mailboxes = mailbox_tree_init(list->sep);
mailbox_tree_set_parents_nonexistent(list->mailboxes);
+ if ((list->list.ns->flags & NAMESPACE_FLAG_INBOX_USER) != 0) {
+ /* INBOX always exists in IMAP server. since this namespace is
+ marked with inbox=yes, show the INBOX even if
+ imapc_list_prefix doesn't match it */
+ bool created;
+ (void)mailbox_tree_get(list->mailboxes, "INBOX", &created);
+ }
+
imapc_simple_run(&ctx);
if (ctx.ret == 0) {
list->refreshed_mailboxes = TRUE;
@@ -471,7 +479,7 @@
node = mailbox_tree_iterate_next(ctx->iter, &name);
if (node == NULL)
return NULL;
- } while (node == ctx->ns_root || (node->flags & MAILBOX_MATCHED) == 0);
+ } while ((node->flags & MAILBOX_MATCHED) == 0);
ctx->info.name = name;
ctx->info.flags = node->flags;
More information about the dovecot-cvs
mailing list