dovecot-2.2: dsync: Fixed syncing a recursive delete of mailbox ...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Aug 15 10:15:30 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/1ed8418031b6
changeset: 18933:1ed8418031b6
user: Timo Sirainen <tss at iki.fi>
date: Sat Aug 15 12:14:35 2015 +0200
description:
dsync: Fixed syncing a recursive delete of mailbox with children.
For example if 1/2/3 exists in both sides and then 1/2/3, 1/2 and 1 are
deleted from one side, the next dsync would delete 1/2/3, but leave 1/2 and
1 undeleted.
diffstat:
src/doveadm/dsync/dsync-mailbox-tree-sync.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (27 lines):
diff -r 40e220761a41 -r 1ed8418031b6 src/doveadm/dsync/dsync-mailbox-tree-sync.c
--- a/src/doveadm/dsync/dsync-mailbox-tree-sync.c Sat Aug 15 12:05:34 2015 +0200
+++ b/src/doveadm/dsync/dsync-mailbox-tree-sync.c Sat Aug 15 12:14:35 2015 +0200
@@ -1289,19 +1289,19 @@
sync_subscription(ctx, local_node, remote_node);
if (local_node->existence == DSYNC_MAILBOX_NODE_DELETED &&
- local_node->first_child == NULL &&
+ !node_has_existent_children(local_node, TRUE) &&
remote_node->existence == DSYNC_MAILBOX_NODE_EXISTS &&
ctx->sync_type != DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_REMOTE) {
/* delete from remote */
- i_assert(remote_node->first_child == NULL);
+ i_assert(!node_has_existent_children(remote_node, TRUE));
remote_node->existence = DSYNC_MAILBOX_NODE_NONEXISTENT;
}
if (remote_node->existence == DSYNC_MAILBOX_NODE_DELETED &&
- remote_node->first_child == NULL &&
+ !node_has_existent_children(remote_node, TRUE) &&
local_node->existence == DSYNC_MAILBOX_NODE_EXISTS &&
ctx->sync_type != DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_LOCAL) {
/* delete from local */
- i_assert(local_node->first_child == NULL);
+ i_assert(!node_has_existent_children(local_node, TRUE));
local_node->existence = DSYNC_MAILBOX_NODE_NONEXISTENT;
sync_add_dir_change(ctx, local_node,
DSYNC_MAILBOX_TREE_SYNC_TYPE_DELETE_DIR);
More information about the dovecot-cvs
mailing list