aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2021-09-21 18:16:24 +0200
committern-peugnet <n.peugnet@free.fr>2021-09-21 18:16:24 +0200
commitbb744d04d4bac4003072264a8696bf59ef884b16 (patch)
tree72492ecc2f712473bdbec726d9adf93644ff3ad3
parent91bdaf7ffa76dee079a07fd54fcaf1d0f84428f0 (diff)
downloaddna-backup-bb744d04d4bac4003072264a8696bf59ef884b16.tar.gz
dna-backup-bb744d04d4bac4003072264a8696bf59ef884b16.zip
fix same delta chunk is not found on second commit
-rw-r--r--repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/repo.go b/repo.go
index f29dfb6..ff19333 100644
--- a/repo.go
+++ b/repo.go
@@ -582,7 +582,7 @@ func (r *Repo) matchStream(stream io.Reader, version int) []Chunk {
h := hasher.Sum64()
chunkId, exists := r.fingerprints[h]
if exists {
- if len(buff) > r.chunkSize && len(buff) < r.chunkSize*2 {
+ if len(buff) > r.chunkSize && len(buff) <= r.chunkSize*2 {
size := len(buff) - r.chunkSize
temp := NewTempChunk(buff[:size])
chunks = append(chunks, r.encodeTempChunks(prev, temp, version, &last, storeQueue)...)