]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Mailbox deletion shouldn't fail when trying to delete read-only attributes.
authorTimo Sirainen <tss@iki.fi>
Tue, 8 Sep 2015 15:45:57 +0000 (18:45 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 8 Sep 2015 15:45:57 +0000 (18:45 +0300)
src/lib-storage/index/index-storage.c

index 37f8a973f177ce6fc01f0086a946a37329306293..9203d3f5725cd8bfe9fc6e39cb624d153955e849 100644 (file)
@@ -632,8 +632,12 @@ mailbox_delete_all_attributes(struct mailbox_transaction_context *t,
                            strlen(MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT_SERVER)) == 0)
                        continue;
 
-               if (mailbox_attribute_unset(t, type, key) < 0)
-                       ret = -1;
+               if (mailbox_attribute_unset(t, type, key) < 0) {
+                       if (mailbox_get_last_mail_error(t->box) != MAIL_ERROR_NOTPOSSIBLE) {
+                               ret = -1;
+                               break;
+                       }
+               }
        }
        if (mailbox_attribute_iter_deinit(&iter) < 0)
                ret = -1;