From: Timo Sirainen Date: Tue, 20 Jun 2023 15:44:52 +0000 (+0300) Subject: mdbox: Don't do temp file scanning for mailbox directories X-Git-Tag: 2.4.0~2683 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a82e0342b590394fb7c59fc7e886a67ba227b57;p=thirdparty%2Fdovecot%2Fcore.git mdbox: Don't do temp file scanning for mailbox directories The intention was to delete any temporary mail files that have been left behind by crashed processes, but mail files are written to storage/ directory. --- diff --git a/src/lib-storage/index/dbox-common/dbox-storage.c b/src/lib-storage/index/dbox-common/dbox-storage.c index 2f4ad057df..b54d511735 100644 --- a/src/lib-storage/index/dbox-common/dbox-storage.c +++ b/src/lib-storage/index/dbox-common/dbox-storage.c @@ -285,7 +285,7 @@ int dbox_mailbox_open(struct mailbox *box) return 0; } -static void dbox_mailbox_close_cleanup(struct mailbox *box) +void dbox_mailbox_close_cleanup(struct mailbox *box) { if (box->view == NULL) return; @@ -322,7 +322,6 @@ static void dbox_mailbox_close_cleanup(struct mailbox *box) void dbox_mailbox_close(struct mailbox *box) { - dbox_mailbox_close_cleanup(box); index_storage_mailbox_close(box); } diff --git a/src/lib-storage/index/dbox-common/dbox-storage.h b/src/lib-storage/index/dbox-common/dbox-storage.h index a6c4f7d8d1..6ec670d5d1 100644 --- a/src/lib-storage/index/dbox-common/dbox-storage.h +++ b/src/lib-storage/index/dbox-common/dbox-storage.h @@ -76,6 +76,7 @@ void dbox_notify_changes(struct mailbox *box); int dbox_mailbox_check_existence(struct mailbox *box); int dbox_mailbox_open(struct mailbox *box); void dbox_mailbox_close(struct mailbox *box); +void dbox_mailbox_close_cleanup(struct mailbox *box); int dbox_mailbox_create(struct mailbox *box, const struct mailbox_update *update, bool directory); int dbox_mailbox_create_indexes(struct mailbox *box, diff --git a/src/lib-storage/index/dbox-single/sdbox-storage.c b/src/lib-storage/index/dbox-single/sdbox-storage.c index ecdb207b93..ffcb121fe9 100644 --- a/src/lib-storage/index/dbox-single/sdbox-storage.c +++ b/src/lib-storage/index/dbox-single/sdbox-storage.c @@ -375,6 +375,7 @@ static void sdbox_mailbox_close(struct mailbox *box) if (mbox->corrupted_rebuild_count != 0) (void)sdbox_sync(mbox, 0); + dbox_mailbox_close_cleanup(box); dbox_mailbox_close(box); }