From bb744d04d4bac4003072264a8696bf59ef884b16 Mon Sep 17 00:00:00 2001 From: n-peugnet Date: Tue, 21 Sep 2021 18:16:24 +0200 Subject: fix same delta chunk is not found on second commit --- repo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'repo.go') 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)...) -- cgit v1.2.3