From: Timo Sirainen Date: Sun, 17 May 2009 18:27:07 +0000 (-0400) Subject: LIST: Previous prefix="", list=no change broke listing other list=no namespaces. X-Git-Tag: 2.0.alpha1~751 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b2a3c00309849aa9799b366a571401dbe15e3da2;p=thirdparty%2Fdovecot%2Fcore.git LIST: Previous prefix="", list=no change broke listing other list=no namespaces. --HG-- branch : HEAD --- diff --git a/src/imap/cmd-list.c b/src/imap/cmd-list.c index 64876adcd1..13836c7fbb 100644 --- a/src/imap/cmd-list.c +++ b/src/imap/cmd-list.c @@ -571,15 +571,16 @@ list_namespace_match_pattern(struct cmd_list_context *ctx, bool inboxcase, skip_namespace_prefix_pattern(ctx, &cur_ns_prefix, cur_ref, &cur_pattern); if (*cur_ns_prefix == '\0') { - /* no namespace prefix: if list=no we don't want to show - anything, except when the client does e.g. LIST "" mailbox. - prefix="", list=no namespace is mainly useful for working - around client bugs. */ - if ((ns->flags & NAMESPACE_FLAG_LIST_PREFIX) == 0 && - list_pattern_has_wildcards(cur_pattern)) - return FALSE; - else - return TRUE; + if (*ns->prefix == '\0') { + /* no namespace prefix: if list=no we don't want to + show anything, except when the client does e.g. + LIST "" mailbox. prefix="", list=no namespace is + mainly useful for working around client bugs. */ + if ((ns->flags & NAMESPACE_FLAG_LIST_PREFIX) == 0 && + list_pattern_has_wildcards(cur_pattern)) + return FALSE; + } + return TRUE; } /* namespace prefix still wasn't completely skipped over.