Mercurial > dovecot > original-hg > dovecot-1.2
changeset 4193:a47df521d4fa HEAD
If mailbox was opened with readonly-flag, don't really force it. Fixes
EXAMINE box + APPEND box.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 14 Apr 2006 14:14:08 +0300 |
parents | 26e028337e1e |
children | de4609242c8a |
files | src/lib-storage/index/mbox/mbox-save.c src/lib-storage/index/mbox/mbox-storage.c src/lib-storage/index/mbox/mbox-sync.c |
diffstat | 3 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-save.c Fri Apr 14 14:00:07 2006 +0300 +++ b/src/lib-storage/index/mbox/mbox-save.c Fri Apr 14 14:14:08 2006 +0300 @@ -269,7 +269,7 @@ struct mbox_mailbox *mbox = ctx->mbox; int ret; - if (ctx->mbox->mbox_readonly || ctx->mbox->ibox.readonly) { + if (ctx->mbox->mbox_readonly) { mail_storage_set_error(STORAGE(ctx->mbox->storage), "Read-only mbox"); return -1;
--- a/src/lib-storage/index/mbox/mbox-storage.c Fri Apr 14 14:00:07 2006 +0300 +++ b/src/lib-storage/index/mbox/mbox-storage.c Fri Apr 14 14:14:08 2006 +0300 @@ -1041,7 +1041,7 @@ hdr = mail_index_get_header(mbox->ibox.view); if ((hdr->flags & MAIL_INDEX_HDR_FLAG_HAVE_DIRTY) != 0 && - !mbox->ibox.readonly && !mbox->mbox_readonly) { + !mbox->mbox_readonly) { /* we've done changes to mbox which haven't been written yet. do it now. */ if (mbox_sync(mbox, MBOX_SYNC_REWRITE) < 0)
--- a/src/lib-storage/index/mbox/mbox-sync.c Fri Apr 14 14:00:07 2006 +0300 +++ b/src/lib-storage/index/mbox/mbox-sync.c Fri Apr 14 14:14:08 2006 +0300 @@ -1546,7 +1546,7 @@ int ret, changed; bool delay_writes; - delay_writes = mbox->ibox.readonly || + delay_writes = mbox->mbox_readonly || ((flags & MBOX_SYNC_REWRITE) == 0 && getenv("MBOX_LAZY_WRITES") != NULL);