]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm backup: Fixed assert-crash when syncing mailbox deletion.
authorTimo Sirainen <tss@iki.fi>
Mon, 3 Feb 2014 16:50:49 +0000 (11:50 -0500)
committerTimo Sirainen <tss@iki.fi>
Mon, 3 Feb 2014 16:50:49 +0000 (11:50 -0500)
src/doveadm/dsync/dsync-mailbox-tree-sync.c

index 552b9af466ef557b4986a00e9dae44d27c3e7b25..581f41fac3e1b2cfc37d915f230bde97dcf1a1cd 100644 (file)
@@ -1217,9 +1217,9 @@ dsync_mailbox_trees_sync_init(struct dsync_mailbox_tree *local_tree,
        ctx->sync_flags = sync_flags;
        i_array_init(&ctx->changes, 128);
 
-       ignore_deletes = sync_type == DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_LOCAL;
-       sync_tree_sort_and_delete_mailboxes(ctx, remote_tree, ignore_deletes);
        ignore_deletes = sync_type == DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_REMOTE;
+       sync_tree_sort_and_delete_mailboxes(ctx, remote_tree, ignore_deletes);
+       ignore_deletes = sync_type == DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_LOCAL;
        sync_tree_sort_and_delete_mailboxes(ctx, local_tree, ignore_deletes);
 
        dsync_mailbox_tree_update_child_timestamps(&local_tree->root, 0);