dovecot-1.2: LIST didn't show INBOX if list patterns didn't matc...

dovecot at dovecot.org dovecot at dovecot.org
Sun Jul 20 16:49:38 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/8b240457c4a4
changeset: 8016:8b240457c4a4
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Jul 20 16:03:13 2008 +0300
description:
LIST didn't show INBOX if list patterns didn't match namespace prefix.

diffstat:

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

diffs (25 lines):

diff -r 73b4fe95a6dd -r 8b240457c4a4 src/imap/cmd-list.c
--- a/src/imap/cmd-list.c	Sun Jul 20 15:41:57 2008 +0300
+++ b/src/imap/cmd-list.c	Sun Jul 20 16:03:13 2008 +0300
@@ -619,11 +619,16 @@ static void list_namespace_init(struct c
 	}
 
 	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);


More information about the dovecot-cvs mailing list