dovecot-2.1: lib-storage: Listing multiple mailbox patterns may ...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Oct 26 11:18:02 EEST 2012
details: http://hg.dovecot.org/dovecot-2.1/rev/8f351303887c
changeset: 14783:8f351303887c
user: Timo Sirainen <tss at iki.fi>
date: Fri Oct 26 11:17:51 2012 +0300
description:
lib-storage: Listing multiple mailbox patterns may have returned duplicates with fs layout.
diffstat:
src/lib-storage/list/mailbox-list-fs-iter.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (21 lines):
diff -r 49bb6cc43d03 -r 8f351303887c src/lib-storage/list/mailbox-list-fs-iter.c
--- a/src/lib-storage/list/mailbox-list-fs-iter.c Mon Oct 22 18:59:20 2012 +0300
+++ b/src/lib-storage/list/mailbox-list-fs-iter.c Fri Oct 26 11:17:51 2012 +0300
@@ -447,7 +447,7 @@
/* sort the root dirs so that /foo is before /foo/bar */
array_sort(&ctx->roots, i_strcmp_p);
/* remove /foo/bar when there already exists /foo parent */
- for (i = 1; i < array_count(&ctx->roots); i++) {
+ for (i = 1; i < array_count(&ctx->roots); ) {
parentp = array_idx(&ctx->roots, i-1);
childp = array_idx(&ctx->roots, i);
parentlen = strlen(*parentp);
@@ -456,6 +456,8 @@
(*childp)[parentlen] == ctx->sep ||
(*childp)[parentlen] == '\0'))
array_delete(&ctx->roots, i, 1);
+ else
+ i++;
}
}
More information about the dovecot-cvs
mailing list