From 2971a769daa5b899151b0e6e78751aa3d5af89dc Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Fri, 12 Jul 2024 22:27:00 +0200 Subject: [PATCH] restore: fix corrupt restore of partially up to date files --- internal/restorer/filerestorer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/restorer/filerestorer.go b/internal/restorer/filerestorer.go index d2a4ba068..f0983e003 100644 --- a/internal/restorer/filerestorer.go +++ b/internal/restorer/filerestorer.go @@ -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{