dovecot-2.2: imap: COPY allows transaction commit now to fail wi...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Oct 21 20:48:08 EEST 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/7bd65a83a9a3
changeset: 16858:7bd65a83a9a3
user: Timo Sirainen <tss at iki.fi>
date: Mon Oct 21 20:47:53 2013 +0300
description:
imap: COPY allows transaction commit now to fail with "some messages were expunged".
diffstat:
src/imap/cmd-copy.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (22 lines):
diff -r 73216464c8e1 -r 7bd65a83a9a3 src/imap/cmd-copy.c
--- a/src/imap/cmd-copy.c Wed Oct 16 20:16:45 2013 +0300
+++ b/src/imap/cmd-copy.c Mon Oct 21 20:47:53 2013 +0300
@@ -127,9 +127,15 @@
msg = t_str_new(256);
if (ret <= 0)
mailbox_transaction_rollback(&t);
- else if (mailbox_transaction_commit_get_changes(&t, &changes) < 0)
- ret = -1;
- else if (copy_count == 0) {
+ else if (mailbox_transaction_commit_get_changes(&t, &changes) < 0) {
+ if (mailbox_get_last_mail_error(destbox) == MAIL_ERROR_EXPUNGED) {
+ /* storage backend didn't notice the expunge until
+ at commit time. */
+ ret = 0;
+ } else {
+ ret = -1;
+ }
+ } else if (copy_count == 0) {
str_append(msg, "OK No messages found.");
pool_unref(&changes.pool);
} else if (seq_range_count(&changes.saved_uids) == 0 ||
More information about the dovecot-cvs
mailing list