changeset 7442:eec74a6ad62e HEAD

STORE: Ignore flag changes for read-only (especially EXAMINEd) mailboxes.
author Timo Sirainen <tss@iki.fi>
date Sun, 30 Mar 2008 11:57:57 +0300
parents ffd549b542c5
children 00d3b46f61e6
files src/imap/cmd-store.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/imap/cmd-store.c	Sun Mar 30 11:46:45 2008 +0300
+++ b/src/imap/cmd-store.c	Sun Mar 30 11:57:57 2008 +0300
@@ -86,6 +86,12 @@
 	if (search_arg == NULL)
 		return TRUE;
 
+	if (mailbox_is_readonly(box)) {
+		return cmd_sync(cmd, MAILBOX_SYNC_FLAG_FAST |
+				(cmd->uid ? 0 : MAILBOX_SYNC_FLAG_NO_EXPUNGES),
+				0, "OK Store ignored with read-only mailbox.");
+	}
+
 	t = mailbox_transaction_begin(box, !silent ? 0 :
 				      MAILBOX_TRANSACTION_FLAG_HIDE);
 	if (keywords_list == NULL && modify_type != MODIFY_REPLACE)