2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-25 20:11:06 +00:00

restore: fix corrupt restore of partially up to date files

This commit is contained in:
Michael Eischer 2024-07-12 22:27:00 +02:00
parent 40e5163114
commit 2971a769da

View File

@ -136,8 +136,8 @@ func (r *fileRestorer) restoreFiles(ctx context.Context) error {
err := r.forEachBlob(fileBlobs, func(packID restic.ID, blob restic.Blob, idx int) {
if largeFile && !file.state.HasMatchingBlob(idx) {
packsMap[packID] = append(packsMap[packID], fileBlobInfo{id: blob.ID, offset: fileOffset})
fileOffset += int64(blob.DataLength())
}
fileOffset += int64(blob.DataLength())
pack, ok := packs[packID]
if !ok {
pack = &packInfo{