Mercurial > dovecot > core-2.2
changeset 14241:07fc8baa0c9b
fs layout: Mailbox listing returned duplicates when patterns contained a parent and its children.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 28 Feb 2012 04:29:12 +0200 |
parents | 3b328ffffdd4 |
children | 54aeb3853bae |
files | src/lib-storage/list/mailbox-list-fs-iter.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/list/mailbox-list-fs-iter.c Mon Feb 27 16:53:50 2012 +0200 +++ b/src/lib-storage/list/mailbox-list-fs-iter.c Tue Feb 28 04:29:12 2012 +0200 @@ -360,7 +360,8 @@ childp = array_idx(&ctx->roots, i); parentlen = strlen(*parentp); if (strncmp(*parentp, *childp, parentlen) == 0 && - ((*childp)[parentlen] == ctx->sep || + (parentlen == 0 || + (*childp)[parentlen] == ctx->sep || (*childp)[parentlen] == '\0')) array_delete(&ctx->roots, i, 1); }