]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: If mailbox is already deleted locally, don't attempt to delete it again.
authorTimo Sirainen <tss@iki.fi>
Sat, 15 Aug 2015 10:05:34 +0000 (12:05 +0200)
committerTimo Sirainen <tss@iki.fi>
Sat, 15 Aug 2015 10:05:34 +0000 (12:05 +0200)
This only caused an unnecessary desync warning / exit code.

src/doveadm/dsync/dsync-mailbox-tree-sync.c

index f0a149e8df508a61a33a2827920c572411a51e96..c6a6bf5e878610103deda984be3d887792e414bf 100644 (file)
@@ -164,7 +164,8 @@ sync_delete_mailbox_node(struct dsync_mailbox_tree_sync_ctx *ctx,
                        guid_128_to_string(node->mailbox_guid), reason);
        }
 
-       if (tree == ctx->local_tree) {
+       if (tree == ctx->local_tree &&
+           node->existence != DSYNC_MAILBOX_NODE_DELETED) {
                /* delete this mailbox locally */
                i_assert(ctx->sync_type != DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_LOCAL);
                change = array_append_space(&ctx->changes);