From: Timo Sirainen Date: Tue, 20 Jun 2023 19:59:19 +0000 (+0300) Subject: sdbox: If mail file is found to be corrupted, fix the file immediately X-Git-Tag: 2.4.0~2675 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bab8d21d8dd0e2feb3b0a4096d89a6d35d34a05b;p=thirdparty%2Fdovecot%2Fcore.git sdbox: If mail file is found to be corrupted, fix the file immediately Don't mark the whole mailbox corrupted. The file fixing on sdbox rebuild will be removed by a following commit. --- diff --git a/src/lib-storage/index/dbox-single/sdbox-storage.c b/src/lib-storage/index/dbox-single/sdbox-storage.c index ffcb121fe9..8814674663 100644 --- a/src/lib-storage/index/dbox-single/sdbox-storage.c +++ b/src/lib-storage/index/dbox-single/sdbox-storage.c @@ -306,9 +306,7 @@ void sdbox_set_mailbox_corrupted(struct mailbox *box) static void sdbox_set_file_corrupted(struct dbox_file *_file) { - struct sdbox_file *file = (struct sdbox_file *)_file; - - sdbox_set_mailbox_corrupted(&file->mbox->box); + (void)dbox_file_fix(_file, 0); } static int sdbox_mailbox_alloc_index(struct sdbox_mailbox *mbox)