2
2
mirror of https://github.com/octoleo/restic.git synced 2024-05-29 23:20:49 +00:00

repair index: fix deletion of legacy indexes

This commit is contained in:
Michael Eischer 2024-03-09 18:21:22 +01:00
parent 1a8bf358f1
commit f8852f0eb6

View File

@ -523,6 +523,7 @@ func DecodeIndex(buf []byte, id restic.ID) (idx *Index, oldFormat bool, err erro
debug.Log("index is probably old format, trying that") debug.Log("index is probably old format, trying that")
idx, err = decodeOldIndex(buf) idx, err = decodeOldIndex(buf)
idx.ids = append(idx.ids, id)
return idx, err == nil, err return idx, err == nil, err
} }