dovecot-2.2: lib-storage: mailbox_list_iter_init_namespaces() du...

dovecot at dovecot.org dovecot at dovecot.org
Sun May 20 03:26:25 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/bbe6b6c2ee99
changeset: 14281:bbe6b6c2ee99
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Mar 04 14:31:23 2012 +0200
description:
lib-storage: mailbox_list_iter_init_namespaces() duplicated INBOX if it was also ns prefix.

diffstat:

 src/lib-storage/mailbox-list-iter.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 92c6e963176e -r bbe6b6c2ee99 src/lib-storage/mailbox-list-iter.c
--- a/src/lib-storage/mailbox-list-iter.c	Sun Mar 04 14:12:19 2012 +0200
+++ b/src/lib-storage/mailbox-list-iter.c	Sun Mar 04 14:31:23 2012 +0200
@@ -334,6 +334,12 @@
 	unsigned int i;
 	bool ret = FALSE;
 
+	if (strncasecmp(ns->prefix, "INBOX", ns->prefix_len-1) == 0) {
+		/* INBOX is going to be listed in any case,
+		   don't duplicate it */
+		return FALSE;
+	}
+
 	for (i = 0; ctx->patterns_ns_match[i] != NULL; i++) {
 		T_BEGIN {
 			ret = iter_next_try_prefix_pattern(ctx, ns,


More information about the dovecot-cvs mailing list