Mercurial > dovecot > core-2.2
changeset 12058:eecc2fda78c1
lib-storage: If mailbox deletion fails, mark the index back as undeleted.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 01 Sep 2010 17:32:37 +0100 |
parents | 0c73829cd1f8 |
children | 75611e9088b6 |
files | src/lib-storage/mail-storage.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/mail-storage.c Wed Sep 01 17:10:14 2010 +0100 +++ b/src/lib-storage/mail-storage.c Wed Sep 01 17:32:37 2010 +0100 @@ -748,6 +748,12 @@ } ret = box->v.delete(box); + if (ret < 0 && box->marked_deleted) { + /* deletion failed. revert the mark so it can maybe be + tried again later. */ + if (mailbox_mark_index_deleted(box, FALSE) < 0) + return -1; + } box->deleting = FALSE; mailbox_close(box);