dovecot-2.2: doveadm backup: Don't assert-crash trying to delete...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Oct 26 11:07:49 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/83cdfd0bc79d
changeset: 15259:83cdfd0bc79d
user: Timo Sirainen <tss at iki.fi>
date: Fri Oct 26 11:07:43 2012 +0300
description:
doveadm backup: Don't assert-crash trying to delete noselect-mailboxes too early.
diffstat:
src/doveadm/dsync/dsync-mailbox-tree-sync.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r 67af7122a522 -r 83cdfd0bc79d src/doveadm/dsync/dsync-mailbox-tree-sync.c
--- a/src/doveadm/dsync/dsync-mailbox-tree-sync.c Fri Oct 26 10:36:43 2012 +0300
+++ b/src/doveadm/dsync/dsync-mailbox-tree-sync.c Fri Oct 26 11:07:43 2012 +0300
@@ -932,7 +932,8 @@
ret = strcmp(node->name, wanted_node->name);
if (ret < 0) {
/* node shouldn't exist */
- if (node->existence == DSYNC_MAILBOX_NODE_EXISTS)
+ if (node->existence == DSYNC_MAILBOX_NODE_EXISTS &&
+ !dsync_mailbox_node_is_dir(node))
sync_delete_mailbox_node(ctx, tree, node);
node = node->next;
} else if (ret > 0) {
@@ -940,7 +941,8 @@
wanted_node = wanted_node->next;
} else {
if (sync_is_wrong_mailbox(node, wanted_node) &&
- node->existence == DSYNC_MAILBOX_NODE_EXISTS)
+ node->existence == DSYNC_MAILBOX_NODE_EXISTS &&
+ !dsync_mailbox_node_is_dir(node))
sync_delete_mailbox_node(ctx, tree, node);
node = node->next;
wanted_node = wanted_node->next;
@@ -953,7 +955,8 @@
tree, wanted_tree,
node->first_child, NULL);
}
- if (node->existence == DSYNC_MAILBOX_NODE_EXISTS)
+ if (node->existence == DSYNC_MAILBOX_NODE_EXISTS &&
+ !dsync_mailbox_node_is_dir(node))
sync_delete_mailbox_node(ctx, tree, node);
}
}
More information about the dovecot-cvs
mailing list