diff --git a/src/csync_update.c b/src/csync_update.c index 815079afd5..c62fcdf1e2 100644 --- a/src/csync_update.c +++ b/src/csync_update.c @@ -91,7 +91,6 @@ static int _csync_detect_update(CSYNC *ctx, const char *file, } path = file; - len = strlen(path); switch (ctx->current) { case LOCAL_REPLICA: if (strlen(path) <= strlen(ctx->local.uri)) { @@ -111,6 +110,8 @@ static int _csync_detect_update(CSYNC *ctx, const char *file, break; } + len = strlen(path); + h = _hash_of_file(ctx, file ); if( h == 0 ) { return -1;