changeset 16506:949ef3625aa2

mailbox_list_index=yes: Fixed list iteration when namespace and backend separators differed.
author Timo Sirainen <tss@iki.fi>
date Thu, 13 Jun 2013 05:27:30 +0300
parents 63092465c522
children c012f8df87f9
files src/lib-storage/list/mailbox-list-index-iter.c src/lib-storage/list/mailbox-list-index.h
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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));
--- 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;
 };