dovecot-2.0: LIST: Previous prefix="", list=no change broke list...

dovecot at dovecot.org dovecot at dovecot.org
Sun May 17 21:27:34 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/6e0ea2caf655
changeset: 9301:6e0ea2caf655
user:      Timo Sirainen <tss at iki.fi>
date:      Sun May 17 14:27:07 2009 -0400
description:
LIST: Previous prefix="", list=no change broke listing other list=no namespaces.

diffstat:

1 file changed, 10 insertions(+), 9 deletions(-)
src/imap/cmd-list.c |   19 ++++++++++---------

diffs (29 lines):

diff -r b66054f9b8fb -r 6e0ea2caf655 src/imap/cmd-list.c
--- a/src/imap/cmd-list.c	Fri May 15 16:47:14 2009 -0400
+++ b/src/imap/cmd-list.c	Sun May 17 14:27:07 2009 -0400
@@ -571,15 +571,16 @@ list_namespace_match_pattern(struct cmd_
 	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.


More information about the dovecot-cvs mailing list