From: Wayne Davison Date: Sat, 27 Oct 2007 04:41:18 +0000 (+0000) Subject: Fixed a problem with build_hash_table() getting called too X-Git-Tag: v3.0.0pre4~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5851ac2dfed01258adee729596ceed7bdfe069a4;p=thirdparty%2Frsync.git Fixed a problem with build_hash_table() getting called too often when overwriting a shorter file. --- diff --git a/match.c b/match.c index 01e91173..79e591a2 100644 --- a/match.c +++ b/match.c @@ -171,7 +171,10 @@ static void hash_search(int f,struct sum_struct *s, if (offset >= reset) { sum_pos = build_hash_table(s, sum_pos); - reset = sum_pos * s->blength; + if (sum_pos == s->count) + reset = len; + else + reset = sum_pos * s->blength; } if (verbose > 4) {