dovecot-2.1: lib-storage: Fixed listing subscriptions from prefi...

dovecot at dovecot.org dovecot at dovecot.org
Wed Nov 16 20:00:48 EET 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/16024d03f66e
changeset: 13713:16024d03f66e
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Nov 16 20:00:37 2011 +0200
description:
lib-storage: Fixed listing subscriptions from prefix!="" namespace

diffstat:

 src/lib-storage/list/mailbox-list-subscriptions.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (15 lines):

diff -r 4bdfe947a0b2 -r 16024d03f66e src/lib-storage/list/mailbox-list-subscriptions.c
--- a/src/lib-storage/list/mailbox-list-subscriptions.c	Wed Nov 16 19:48:01 2011 +0200
+++ b/src/lib-storage/list/mailbox-list-subscriptions.c	Wed Nov 16 20:00:37 2011 +0200
@@ -224,7 +224,10 @@
 	mailbox_list_subscriptions_fill(&ctx->ctx, ctx->tree);
 
 	ctx->info.ns = list->ns;
-	ctx->iter = mailbox_tree_iterate_init(ctx->tree, NULL, 0);
+	/* the tree usually has only those entries we want to iterate through,
+	   but there are also non-matching root entries (e.g. "LSUB foo/%" will
+	   include the "foo"), which we'll drop with MAILBOX_MATCHED. */
+	ctx->iter = mailbox_tree_iterate_init(ctx->tree, NULL, MAILBOX_MATCHED);
 	return &ctx->ctx;
 }
 


More information about the dovecot-cvs mailing list