dovecot: Mailbox listing fix.

dovecot at dovecot.org dovecot at dovecot.org
Mon Mar 3 06:01:07 EET 2008


details:   http://hg.dovecot.org/dovecot/rev/c9567a98760d
changeset: 7317:c9567a98760d
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Mar 03 06:01:03 2008 +0200
description:
Mailbox listing fix.

diffstat:

1 file changed, 3 insertions(+), 1 deletion(-)
src/lib-storage/list/mailbox-list-fs-iter.c |    4 +++-

diffs (22 lines):

diff -r 5d37ca11808d -r c9567a98760d src/lib-storage/list/mailbox-list-fs-iter.c
--- a/src/lib-storage/list/mailbox-list-fs-iter.c	Mon Mar 03 02:54:46 2008 +0200
+++ b/src/lib-storage/list/mailbox-list-fs-iter.c	Mon Mar 03 06:01:03 2008 +0200
@@ -304,6 +304,7 @@ fs_list_iter_next(struct mailbox_list_it
 	T_BEGIN {
 		info = ctx->next(ctx);
 	} T_END;
+	i_assert(info == NULL || info->name != NULL);
 	return info;
 }
 
@@ -424,8 +425,9 @@ list_file_subdir(struct fs_list_iterate_
 	else
 		ctx->info.name = NULL;
 
-	scan_subdir = (match2 & (IMAP_MATCH_YES | IMAP_MATCH_CHILDREN)) != 0;
+	scan_subdir = (match & (IMAP_MATCH_YES | IMAP_MATCH_CHILDREN)) != 0;
 	if ((match == IMAP_MATCH_YES || scan_subdir) &&
+	    ctx->info.name != NULL &&
 	    (ctx->ctx.flags & MAILBOX_LIST_ITER_RETURN_CHILDREN) != 0 &&
 	    (ctx->info.flags & (MAILBOX_CHILDREN | MAILBOX_NOCHILDREN)) == 0) {
 		scan_subdir = TRUE;


More information about the dovecot-cvs mailing list