dovecot-2.2: dsync: Use mailbox_move() to reassign UIDs instead ...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Oct 23 12:34:53 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/f417cab3a21f
changeset: 15233:f417cab3a21f
user: Timo Sirainen <tss at iki.fi>
date: Tue Oct 23 12:34:42 2012 +0300
description:
dsync: Use mailbox_move() to reassign UIDs instead of copy+expunge.
diffstat:
src/doveadm/dsync/dsync-mailbox-import.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (31 lines):
diff -r 6c850258002f -r f417cab3a21f src/doveadm/dsync/dsync-mailbox-import.c
--- a/src/doveadm/dsync/dsync-mailbox-import.c Sun Oct 21 12:20:30 2012 +0300
+++ b/src/doveadm/dsync/dsync-mailbox-import.c Tue Oct 23 12:34:42 2012 +0300
@@ -966,10 +966,8 @@
save_ctx = mailbox_save_alloc(importer->ext_trans);
mailbox_save_copy_flags(save_ctx, importer->mail);
mailbox_save_set_uid(save_ctx, new_uid);
- if (mailbox_copy(&save_ctx, importer->mail) == 0) {
+ if (mailbox_move(&save_ctx, importer->mail) == 0)
array_append(&importer->wanted_uids, &new_uid, 1);
- mail_expunge(importer->mail);
- }
}
static void
@@ -1266,10 +1264,12 @@
save_ctx = mailbox_save_alloc(trans);
mailbox_save_copy_flags(save_ctx, mail);
- if (mailbox_copy(&save_ctx, mail) < 0)
+ if (mailbox_move(&save_ctx, mail) < 0) {
+ i_error("Couldn't move mail within mailbox %s: %s",
+ mailbox_get_vname(box),
+ mailbox_get_last_error(box, NULL));
ret = -1;
- else
- mail_expunge(mail);
+ }
}
mail_free(&mail);
More information about the dovecot-cvs
mailing list