summaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2007-10-27 04:41:18 +0000
committerWayne Davison <wayned@samba.org>2007-10-27 04:41:18 +0000
commit5851ac2dfed01258adee729596ceed7bdfe069a4 (patch)
tree3b65d0bbf3a65f973454298176c64c6bcdac28ed /match.c
parente844a4a8a8500e6e1cbb53c2a932c2c57bc0ca9f (diff)
downloadrsync-5851ac2dfed01258adee729596ceed7bdfe069a4.tar.gz
Fixed a problem with build_hash_table() getting called too
often when overwriting a shorter file.
Diffstat (limited to 'match.c')
-rw-r--r--match.c5
1 files changed, 4 insertions, 1 deletions
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) {