crypto: Use helpers for size calculations

This commit is contained in:
Michael Eischer
2022-02-13 16:48:48 +01:00
parent d6db5a1fc2
commit 243698680a
3 changed files with 4 additions and 5 deletions

View File

@@ -195,7 +195,7 @@ func (r *fileRestorer) downloadPack(ctx context.Context, pack *packInfo) error {
if packID.Equal(pack.id) {
addBlob(blob, fileOffset)
}
fileOffset += int64(blob.Length) - crypto.Extension
fileOffset += int64(restic.PlaintextLength(int(blob.Length)))
})
if err != nil {
// restoreFiles should have caught this error before