Mercurial > dovecot > original-hg > dovecot-1.2
changeset 9029:db2fdf3529ac HEAD
LIST: Previous prefix="", list=no change broke listing other list=no namespaces.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 17 May 2009 14:27:07 -0400 |
parents | fa9bc4ef6f32 |
children | 125862a5b52f |
files | src/imap/cmd-list.c |
diffstat | 1 files changed, 10 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/cmd-list.c Fri May 15 13:06:15 2009 -0400 +++ b/src/imap/cmd-list.c Sun May 17 14:27:07 2009 -0400 @@ -571,15 +571,16 @@ 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.