diff --git a/csync/src/csync_reconcile.c b/csync/src/csync_reconcile.c index 8cddd0a11..140117ba1 100644 --- a/csync/src/csync_reconcile.c +++ b/csync/src/csync_reconcile.c @@ -249,8 +249,12 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) { cur->instruction = CSYNC_INSTRUCTION_NONE; other->instruction = CSYNC_INSTRUCTION_NONE; - if( !cur->etag && other->etag ) cur->etag = c_strdup(other->etag); - cur->should_update_etag = true; /* update DB */ + /* update DB with new etag from remote */ + if (ctx->current == LOCAL_REPLICA) { + other->should_update_etag = true; + } else { + cur->should_update_etag = true; + } } else if(ctx->current == REMOTE_REPLICA) { cur->instruction = CSYNC_INSTRUCTION_CONFLICT; other->instruction = CSYNC_INSTRUCTION_NONE;