dovecot-2.0: lib-storage: If read-only mailbox uses private flag...
dovecot at dovecot.org
dovecot at dovecot.org
Tue May 25 18:09:18 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/2f7b7747867e
changeset: 11365:2f7b7747867e
user: Timo Sirainen <tss at iki.fi>
date: Tue May 25 16:09:14 2010 +0100
description:
lib-storage: If read-only mailbox uses private flags, don't return it as READ-ONLY.
diffstat:
src/lib-storage/index/index-storage.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (22 lines):
diff -r 6d68b7b25ae7 -r 2f7b7747867e src/lib-storage/index/index-storage.c
--- a/src/lib-storage/index/index-storage.c Tue May 25 15:27:26 2010 +0100
+++ b/src/lib-storage/index/index-storage.c Tue May 25 16:09:14 2010 +0100
@@ -510,8 +510,16 @@
bool index_storage_is_readonly(struct mailbox *box)
{
- return (box->flags & MAILBOX_FLAG_READONLY) != 0 ||
- box->backend_readonly;
+ if ((box->flags & MAILBOX_FLAG_READONLY) != 0)
+ return TRUE;
+
+ if (box->backend_readonly) {
+ /* return read-only only if there are no private flags
+ (that are stored in index files) */
+ if (box->private_flags_mask == 0)
+ return TRUE;
+ }
+ return FALSE;
}
bool index_storage_allow_new_keywords(struct mailbox *box)
More information about the dovecot-cvs
mailing list