Skip to content

Commit

Permalink
doveadm backup: If local mailbox has more mails than remote, detect a…
Browse files Browse the repository at this point in the history
…nd delete it earlier.
  • Loading branch information
sirainen committed Jan 28, 2016
1 parent 7d8603f commit 79490ec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/doveadm/dsync/dsync-mailbox-import.c
Expand Up @@ -751,6 +751,11 @@ static bool dsync_mailbox_try_save_cur(struct dsync_mailbox_importer *importer,
/* add a record for local mail */
i_assert(importer->cur_mail != NULL);
if (importer->revert_local_changes) {
if (save_change == NULL) {
dsync_mailbox_revert_existing_uid(importer, importer->cur_mail->uid,
t_strdup_printf("highest than remote's UIDs (remote UIDNEXT=%u)", importer->remote_uid_next));
return TRUE;
}
mail_expunge(importer->cur_mail);
importer->cur_mail_skip = TRUE;
importer->next_local_seq++;
Expand Down

0 comments on commit 79490ec

Please sign in to comment.