diff --git a/src/restic/node.go b/src/restic/node.go index 253a33e9a..5349b5494 100644 --- a/src/restic/node.go +++ b/src/restic/node.go @@ -215,7 +215,7 @@ func (node Node) createFileAt(path string, repo Repository, idx *HardlinkIndex) } buf = buf[:cap(buf)] - if uint(len(buf)) < size { + if len(buf) < CiphertextLength(int(size)) { buf = NewBlobBuffer(int(size)) }