mirror of
https://github.com/octoleo/restic.git
synced 2024-12-26 04:17:29 +00:00
restore: fix corrupt restore of partially up to date files
This commit is contained in:
parent
40e5163114
commit
2971a769da
@ -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{
|
||||
|
Loading…
Reference in New Issue
Block a user