From: Aki Tuomi Date: Tue, 31 Aug 2021 09:48:38 +0000 (+0300) Subject: lib-storage: Move (un)deleting debug message to mailbox_mark_index_deleted X-Git-Tag: 2.3.17~138 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=601b5465dceb739891f55505adbdd85f05a0af90;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Move (un)deleting debug message to mailbox_mark_index_deleted --- diff --git a/src/lib-storage/list/mail-storage-list-index-rebuild.c b/src/lib-storage/list/mail-storage-list-index-rebuild.c index ed80ffd195..f121d7b967 100644 --- a/src/lib-storage/list/mail-storage-list-index-rebuild.c +++ b/src/lib-storage/list/mail-storage-list-index-rebuild.c @@ -244,7 +244,6 @@ mail_storage_list_mailbox_create(struct mailbox *box, if (mailbox_get_last_mail_error(box) == MAIL_ERROR_NOTFOUND) { /* if this is because mailbox was marked as deleted, undelete it and retry. */ - e_debug(box->event, "Attempting to undelete mailbox"); if (mailbox_mark_index_deleted(box, FALSE) < 0) return -1; if (mailbox_create(box, update, FALSE) == 0) diff --git a/src/lib-storage/mail-storage.c b/src/lib-storage/mail-storage.c index 06f921eb66..f9b1ed0d8c 100644 --- a/src/lib-storage/mail-storage.c +++ b/src/lib-storage/mail-storage.c @@ -1771,6 +1771,9 @@ int mailbox_mark_index_deleted(struct mailbox *box, bool del) enum mailbox_flags old_flag; int ret; + e_debug(box->event, "Attempting to %s mailbox", del ? + "delete" : "undelete"); + if (box->marked_deleted && del) { /* we already marked it deleted. this allows plugins to "lock" the deletion earlier. */