dovecot-2.0: lib-storage: If mailbox deletion fails, mark the in...

dovecot at dovecot.org dovecot at dovecot.org
Wed Sep 1 19:32:40 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/eecc2fda78c1
changeset: 12058:eecc2fda78c1
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Sep 01 17:32:37 2010 +0100
description:
lib-storage: If mailbox deletion fails, mark the index back as undeleted.

diffstat:

 src/lib-storage/mail-storage.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 0c73829cd1f8 -r eecc2fda78c1 src/lib-storage/mail-storage.c
--- 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);


More information about the dovecot-cvs mailing list