From: Timo Sirainen Date: Sun, 20 Jul 2008 13:03:13 +0000 (+0300) Subject: LIST didn't show INBOX if list patterns didn't match namespace prefix. X-Git-Tag: 1.2.alpha1~145 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6d842c55d10ba10c87cab7d9c3e127fda7c54232;p=thirdparty%2Fdovecot%2Fcore.git LIST didn't show INBOX if list patterns didn't match namespace prefix. --HG-- branch : HEAD --- diff --git a/src/imap/cmd-list.c b/src/imap/cmd-list.c index 877792bd0d..ce9928922c 100644 --- a/src/imap/cmd-list.c +++ b/src/imap/cmd-list.c @@ -619,11 +619,16 @@ static void list_namespace_init(struct cmd_list_context *ctx) } if (array_count(&used_patterns) == 0) { - /* it's possible that the namespace prefix matched, - even though its children didn't */ - if (ctx->cur_ns_send_prefix) - list_namespace_send_prefix(ctx, TRUE); - return; + if (!ctx->cur_ns_match_inbox) { + /* it's possible that the namespace prefix matched, + even though its children didn't */ + if (ctx->cur_ns_send_prefix) + list_namespace_send_prefix(ctx, TRUE); + return; + } + /* we should still list INBOX */ + pattern = "INBOX"; + array_append(&used_patterns, &pattern, 1); } (void)array_append_space(&used_patterns); /* NULL-terminate */ pat = array_idx(&used_patterns, 0);