dovecot-2.2: dsync: Don't try to delete nonexistent mailbox dire...

dovecot at dovecot.org dovecot at dovecot.org
Fri Jun 14 00:24:01 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/3ef37c649d27
changeset: 16515:3ef37c649d27
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Jun 14 00:16:58 2013 +0300
description:
dsync: Don't try to delete nonexistent mailbox directories.

diffstat:

 src/doveadm/dsync/dsync-mailbox-tree-sync.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (21 lines):

diff -r 1c657812991b -r 3ef37c649d27 src/doveadm/dsync/dsync-mailbox-tree-sync.c
--- a/src/doveadm/dsync/dsync-mailbox-tree-sync.c	Fri Jun 14 00:16:14 2013 +0300
+++ b/src/doveadm/dsync/dsync-mailbox-tree-sync.c	Fri Jun 14 00:16:58 2013 +0300
@@ -868,13 +868,14 @@
 	for (child = node->first_child; child != NULL; child = child->next)
 		sync_rename_delete_node_dirs(ctx, tree, child);
 
-	node->existence = DSYNC_MAILBOX_NODE_NONEXISTENT;
-	node->sync_temporary_name = FALSE;
 	if (tree == ctx->local_tree &&
-	    ctx->sync_type != DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_LOCAL) {
+	    ctx->sync_type != DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_LOCAL &&
+	    node->existence != DSYNC_MAILBOX_NODE_NONEXISTENT) {
 		sync_add_dir_change(ctx, node,
 				    DSYNC_MAILBOX_TREE_SYNC_TYPE_DELETE_DIR);
 	}
+	node->existence = DSYNC_MAILBOX_NODE_NONEXISTENT;
+	node->sync_temporary_name = FALSE;
 }
 
 static bool


More information about the dovecot-cvs mailing list