dovecot-1.0: Don't fail if trying to delete a nonselectable mail...

dovecot at dovecot.org dovecot at dovecot.org
Sat Oct 27 20:37:41 EEST 2007


details:   http://hg.dovecot.org/dovecot-1.0/rev/e302a5949cf0
changeset: 5433:e302a5949cf0
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Oct 27 20:37:34 2007 +0300
description:
Don't fail if trying to delete a nonselectable mailbox.

diffstat:

1 file changed, 4 insertions(+), 2 deletions(-)
src/plugins/quota/quota-storage.c |    6 ++++--

diffs (16 lines):

diff -r 9c74f599bb2f -r e302a5949cf0 src/plugins/quota/quota-storage.c
--- a/src/plugins/quota/quota-storage.c	Sat Oct 27 20:07:44 2007 +0300
+++ b/src/plugins/quota/quota-storage.c	Sat Oct 27 20:37:34 2007 +0300
@@ -269,8 +269,10 @@ static int quota_mailbox_delete(struct m
 	   calculations by adding/removing mails while we're doing this. */
 	box = mailbox_open(storage, name, NULL, MAILBOX_OPEN_FAST |
 			   MAILBOX_OPEN_KEEP_RECENT | MAILBOX_OPEN_KEEP_LOCKED);
-	if (box == NULL)
-		return -1;
+	if (box == NULL) {
+		/* most likely the mailbox isn't selectable, just delete it */
+		return qstorage->super.mailbox_delete(storage, name);
+	}
 
 	memset(&search_arg, 0, sizeof(search_arg));
 	search_arg.type = SEARCH_ALL;


More information about the dovecot-cvs mailing list