changeset 22192:d1f41384291a

lib-storage: If mailbox list iteration fails, don't add INBOX It possibly should have been returned by the list iteration itself and we could be returning it wrong here. Also calling this causes imapc to lost the error message in mailbox_list.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Mon, 12 Jun 2017 14:16:13 +0300
parents 38f7aa3fedab
children 33222df76027
files src/lib-storage/list/mailbox-list-iter.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/list/mailbox-list-iter.c	Mon Jun 12 12:18:28 2017 +0300
+++ b/src/lib-storage/list/mailbox-list-iter.c	Mon Jun 12 14:16:13 2017 +0300
@@ -562,7 +562,7 @@
 	bool has_children;
 
 	if (ctx->cur_ns == NULL) {
-		if (!ctx->inbox_listed && ctx->inbox_list) {
+		if (!ctx->inbox_listed && ctx->inbox_list && !_ctx->failed) {
 			/* send delayed INBOX reply */
 			ctx->inbox_listed = TRUE;
 			inbox_set_children_flags(ctx);