From b989518af3f1a67f4a6029325d198409e162e8bd Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 6 Dec 2012 16:28:37 +0100 Subject: [PATCH] Only request file id for remote replica --- src/csync_propagate.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/csync_propagate.c b/src/csync_propagate.c index de2e515315..28093f0a74 100644 --- a/src/csync_propagate.c +++ b/src/csync_propagate.c @@ -987,10 +987,12 @@ static int _csync_sync_dir(CSYNC *ctx, csync_file_stat_t *st) { times[0].tv_usec = times[1].tv_usec = 0; csync_vio_utimes(ctx, uri, times); - tmd5 = _get_md5(ctx, st->path); - if(tmd5) { - SAFE_FREE(st->md5); - st->md5 = tmd5; + if (ctx->replica == REMOTE_REPLICA) { + tmd5 = _get_md5(ctx, st->path); + if(tmd5) { + SAFE_FREE(st->md5); + st->md5 = tmd5; + } } /* set instruction for the statedb merger */ st->instruction = CSYNC_INSTRUCTION_UPDATED;