dovecot-2.2: mailbox_list_index=yes: Fixed list iteration when n...

dovecot at dovecot.org dovecot at dovecot.org
Thu Jun 13 05:29:24 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/949ef3625aa2
changeset: 16506:949ef3625aa2
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Jun 13 05:27:30 2013 +0300
description:
mailbox_list_index=yes: Fixed list iteration when namespace and backend separators differed.

diffstat:

 src/lib-storage/list/mailbox-list-index-iter.c |  7 ++++---
 src/lib-storage/list/mailbox-list-index.h      |  1 -
 2 files changed, 4 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r 63092465c522 -r 949ef3625aa2 src/lib-storage/list/mailbox-list-index-iter.c
--- a/src/lib-storage/list/mailbox-list-index-iter.c	Thu Jun 13 04:35:06 2013 +0300
+++ b/src/lib-storage/list/mailbox-list-index-iter.c	Thu Jun 13 05:27:30 2013 +0300
@@ -47,7 +47,6 @@
 	ctx->ctx.flags = flags;
 	ctx->ctx.glob = imap_match_init_multiple(pool, patterns, TRUE, ns_sep);
 	array_create(&ctx->ctx.module_contexts, pool, sizeof(void *), 5);
-	ctx->sep = ns_sep;
 	ctx->info_pool = pool_alloconly_create("mailbox list index iter info", 128);
 
 	if (!iter_use_index(ctx)) {
@@ -74,8 +73,10 @@
 	p_clear(ctx->info_pool);
 
 	str_truncate(ctx->path, ctx->parent_len);
-	if (str_len(ctx->path) > 0)
-		str_append_c(ctx->path, ctx->sep);
+	if (str_len(ctx->path) > 0) {
+		str_append_c(ctx->path,
+			     mailbox_list_get_hierarchy_sep(ctx->ctx.list));
+	}
 	str_append(ctx->path, node->name);
 
 	ctx->info.vname = mailbox_list_get_vname(ctx->ctx.list, str_c(ctx->path));
diff -r 63092465c522 -r 949ef3625aa2 src/lib-storage/list/mailbox-list-index.h
--- a/src/lib-storage/list/mailbox-list-index.h	Thu Jun 13 04:35:06 2013 +0300
+++ b/src/lib-storage/list/mailbox-list-index.h	Thu Jun 13 05:27:30 2013 +0300
@@ -119,7 +119,6 @@
 	unsigned int parent_len;
 	string_t *path;
 	struct mailbox_list_index_node *next_node;
-	char sep;
 
 	unsigned int failed:1;
 };


More information about the dovecot-cvs mailing list