From: Timo Sirainen Date: Wed, 22 May 2013 12:16:22 +0000 (+0300) Subject: dsync: Fixed unsubscribing from mailbox within same session as the mailbox's deletion. X-Git-Tag: 2.2.3~135 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5d3670e7e1c0da30a106ee8adef74afec657907;p=thirdparty%2Fdovecot%2Fcore.git dsync: Fixed unsubscribing from mailbox within same session as the mailbox's deletion. --- diff --git a/src/doveadm/dsync/dsync-brain-mailbox-tree.c b/src/doveadm/dsync/dsync-brain-mailbox-tree.c index 63540386fa..fb13444eba 100644 --- a/src/doveadm/dsync/dsync-brain-mailbox-tree.c +++ b/src/doveadm/dsync/dsync-brain-mailbox-tree.c @@ -395,8 +395,8 @@ dsync_brain_mailbox_tree_add_delete(struct dsync_mailbox_tree *tree, name = dsync_mailbox_node_get_full_name(tree, node); other_node = dsync_mailbox_tree_get(other_tree, name); - if (!guid_128_is_empty(other_node->mailbox_guid) || - (other_node->existence == DSYNC_MAILBOX_NODE_EXISTS && + if (other_node->existence == DSYNC_MAILBOX_NODE_EXISTS && + (!guid_128_is_empty(other_node->mailbox_guid) || other_del->type != DSYNC_MAILBOX_DELETE_TYPE_MAILBOX)) { /* other side has already created a new mailbox or directory with this name, we can't delete it */