changeset 21141:10e1f8d0d80f

imapc: Fix assert-crash when deleting mailbox triggers mailbox_get_open_status(). For example vsize header updating triggers this. Fixes: Panic: file mail-storage.c: line 1683: unreached
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Thu, 17 Nov 2016 02:48:20 +0200
parents 977d0025e4b3
children 572ab8899bbc
files src/lib-storage/index/imapc/imapc-storage.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/imapc/imapc-storage.c	Wed Nov 16 21:40:37 2016 +0200
+++ b/src/lib-storage/index/imapc/imapc-storage.c	Thu Nov 17 02:48:20 2016 +0200
@@ -895,7 +895,7 @@
 			return -1;
 	}
 
-	if (box->opened && (items & STATUS_UIDNEXT) != 0 &&
+	if (box->opened && !box->deleting && (items & STATUS_UIDNEXT) != 0 &&
 	    mbox->sync_uid_next == 0) {
 		/* Courier-workaround, it doesn't send UIDNEXT on SELECT */
 		if (imapc_mailbox_run_status(box, STATUS_UIDNEXT, status_r) < 0)