dovecot-2.0: dbox: If mail GUID is changed for copied mail, crea...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Jan 3 18:59:18 EET 2011
details: http://hg.dovecot.org/dovecot-2.0/rev/384d8615039f
changeset: 12537:384d8615039f
user: Timo Sirainen <tss at iki.fi>
date: Mon Jan 03 18:57:05 2011 +0200
description:
dbox: If mail GUID is changed for copied mail, create a new copy of it so it changes.
diffstat:
src/lib-storage/index/dbox-multi/mdbox-save.c | 3 ++-
src/lib-storage/index/dbox-single/sdbox-copy.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r c1e71f579adc -r 384d8615039f src/lib-storage/index/dbox-multi/mdbox-save.c
--- a/src/lib-storage/index/dbox-multi/mdbox-save.c Sat Jan 01 14:34:14 2011 +0200
+++ b/src/lib-storage/index/dbox-multi/mdbox-save.c Mon Jan 03 18:57:05 2011 +0200
@@ -409,7 +409,8 @@
ctx->ctx.finished = TRUE;
if (mail->box->storage != _ctx->transaction->box->storage ||
- _ctx->transaction->box->disable_reflink_copy_to)
+ _ctx->transaction->box->disable_reflink_copy_to ||
+ _ctx->guid != NULL)
return mail_storage_copy(_ctx, mail);
src_mbox = (struct mdbox_mailbox *)mail->box;
diff -r c1e71f579adc -r 384d8615039f src/lib-storage/index/dbox-single/sdbox-copy.c
--- a/src/lib-storage/index/dbox-single/sdbox-copy.c Sat Jan 01 14:34:14 2011 +0200
+++ b/src/lib-storage/index/dbox-single/sdbox-copy.c Mon Jan 03 18:57:05 2011 +0200
@@ -148,7 +148,8 @@
i_assert((_t->flags & MAILBOX_TRANSACTION_FLAG_EXTERNAL) != 0);
ctx->finished = TRUE;
- if (mail_storage_copy_can_use_hardlink(mail->box, &mbox->box)) {
+ if (mail_storage_copy_can_use_hardlink(mail->box, &mbox->box) &&
+ _ctx->guid == NULL) {
T_BEGIN {
ret = sdbox_copy_hardlink(_ctx, mail);
} T_END;
More information about the dovecot-cvs
mailing list