]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: If mailbox autocreate fails with "already exists", ignore the error.
authorTimo Sirainen <tss@iki.fi>
Sat, 1 Jun 2013 01:06:48 +0000 (04:06 +0300)
committerTimo Sirainen <tss@iki.fi>
Sat, 1 Jun 2013 01:06:48 +0000 (04:06 +0300)
This check was supposed to have been already there, but it was checking for
the wrong error.

src/lib-storage/mail-storage.c

index bd4cd71dd3412805a3661e7547aa56fe812c2769..9ecbd47b1270046b9ad0aca170448fa84038622a 100644 (file)
@@ -731,7 +731,7 @@ static int mailbox_autocreate(struct mailbox *box)
 
        if (mailbox_create(box, NULL, FALSE) < 0) {
                errstr = mailbox_get_last_error(box, &error);
-               if (error != MAIL_ERROR_NOTFOUND) {
+               if (error != MAIL_ERROR_EXISTS) {
                        mail_storage_set_critical(box->storage,
                                "Failed to autocreate mailbox %s: %s",
                                box->vname, errstr);