Mercurial > dovecot > core-2.2
changeset 9642:fb91695ec0bf HEAD
dsync: Some fixes.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 17 Jul 2009 20:02:31 -0400 |
parents | 8c370896b657 |
children | 3b285975bb15 |
files | src/dsync/dsync-brain.c |
diffstat | 1 files changed, 4 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dsync/dsync-brain.c Fri Jul 17 18:57:48 2009 -0400 +++ b/src/dsync/dsync-brain.c Fri Jul 17 20:02:31 2009 -0400 @@ -321,19 +321,15 @@ return FALSE; /* finished syncing messages in this mailbox that exist in both source - and destination. if there are any messages left in destination, - expunge them if possible and add their GUIDs to hash in any case. */ + and destination. if there are messages left in destination, + we can't reliably know if they should be expunged, so don't. + Add their GUIDs to hash in any case. */ boxp = array_idx(&sync->brain->src_mailbox_list->mailboxes, sync->src_msg_iter->wanted_mailbox_idx); while ((ret = dsync_brain_msg_iter_next(sync->dest_msg_iter)) > 0) { if (sync->dest_msg_iter->msg.uid >= (*boxp)->uid_next) sync->uid_conflict = TRUE; - if (!sync->uid_conflict) { - dsync_worker_msg_expunge(sync->brain->dest_worker, - sync->dest_msg_iter->msg.uid); - } - sync->dest_msg_iter->msg.guid = NULL; } if (ret == 0) @@ -371,6 +367,7 @@ &count); while (dsync_brain_msg_sync_mailbox_more(sync)) { /* sync the next mailbox */ + sync->uid_conflict = FALSE; mailbox_idx = ++sync->src_msg_iter->wanted_mailbox_idx; sync->dest_msg_iter->wanted_mailbox_idx++; if (mailbox_idx == count) {