diff options
author | Wayne Davison <wayned@samba.org> | 2007-10-27 04:41:18 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2007-10-27 04:41:18 +0000 |
commit | 5851ac2dfed01258adee729596ceed7bdfe069a4 (patch) | |
tree | 3b65d0bbf3a65f973454298176c64c6bcdac28ed /match.c | |
parent | e844a4a8a8500e6e1cbb53c2a932c2c57bc0ca9f (diff) | |
download | rsync-5851ac2dfed01258adee729596ceed7bdfe069a4.tar.gz rsync-5851ac2dfed01258adee729596ceed7bdfe069a4.tar.bz2 rsync-5851ac2dfed01258adee729596ceed7bdfe069a4.zip |
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.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) { |