mirror of
https://github.com/restic/restic.git
synced 2025-11-15 09:12:53 +00:00
Fix setting of ID in DecodeIndex
This commit is contained in:
@@ -520,7 +520,7 @@ func isErrOldIndex(err error) bool {
|
||||
}
|
||||
|
||||
// DecodeIndex unserializes an index from buf.
|
||||
func DecodeIndex(buf []byte) (idx *Index, oldFormat bool, err error) {
|
||||
func DecodeIndex(buf []byte, id restic.ID) (idx *Index, oldFormat bool, err error) {
|
||||
debug.Log("Start decoding index")
|
||||
idxJSON := &jsonIndex{}
|
||||
|
||||
@@ -563,6 +563,7 @@ func DecodeIndex(buf []byte) (idx *Index, oldFormat bool, err error) {
|
||||
}
|
||||
}
|
||||
idx.supersedes = idxJSON.Supersedes
|
||||
idx.ids = append(idx.ids, id)
|
||||
idx.final = true
|
||||
|
||||
debug.Log("done")
|
||||
|
||||
Reference in New Issue
Block a user