1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-23 08:16:36 +00:00

Fix 'cat' command

This commit is contained in:
Alexander Neumann 2016-08-04 18:02:32 +02:00
parent 17e1872544
commit cff6fea32a

View file

@ -161,13 +161,14 @@ func (cmd CmdCat) Execute(args []string) error {
return err
case "blob":
blob, err := repo.Index().Lookup(id)
list, err := repo.Index().Lookup(id, pack.Data)
if err != nil {
return err
}
blob := list[0]
buf := make([]byte, blob.Length)
data, err := repo.LoadBlob(blob.Type, id, buf)
data, err := repo.LoadBlob(id, pack.Data, buf)
if err != nil {
return err
}