]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
EXPUNGE should reply OK even if mailbox is read-only. STORE should use
authorTimo Sirainen <tss@iki.fi>
Thu, 8 May 2003 11:30:32 +0000 (14:30 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 8 May 2003 11:30:32 +0000 (14:30 +0300)
per-session flags, but we'll leave it as FIXME for now..

--HG--
branch : HEAD

src/lib-storage/index/index-expunge.c
src/lib-storage/index/index-update-flags.c

index 6ccdbf22bf1c95be0e6699717eb996f8c0e5a429..1b475617daeb4efe745c433da0480371198b1841 100644 (file)
@@ -68,8 +68,11 @@ int index_storage_expunge(struct mailbox *box, int notify)
        int failed;
 
        if (box->readonly) {
-               mail_storage_set_error(box->storage, "Mailbox is read-only");
-               return FALSE;
+               box->storage->callbacks->
+                       notify_no(&ibox->box,
+                                 "Mailbox is read-only, ignoring expunge",
+                                 box->storage->callback_context);
+               return TRUE;
        }
 
        if (!index_storage_lock(ibox, MAIL_LOCK_EXCLUSIVE))
index 573f97d0e2e10422d00990ae7e8cbe8773e2c418..29e833dd3a60bf0a81def098b01dd59d801e3817 100644 (file)
@@ -67,6 +67,7 @@ int index_storage_update_flags(struct mailbox *box, const char *messageset,
        int ret, ret2;
 
        if (box->readonly) {
+               /* FIXME: we should use memory */
                mail_storage_set_error(box->storage, "Mailbox is read-only");
                return FALSE;
        }