mirror of
https://github.com/octoleo/restic.git
synced 2024-12-23 11:28:54 +00:00
Fix 'cat' command
This commit is contained in:
parent
17e1872544
commit
cff6fea32a
@ -161,13 +161,14 @@ func (cmd CmdCat) Execute(args []string) error {
|
|||||||
return err
|
return err
|
||||||
|
|
||||||
case "blob":
|
case "blob":
|
||||||
blob, err := repo.Index().Lookup(id)
|
list, err := repo.Index().Lookup(id, pack.Data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
blob := list[0]
|
||||||
|
|
||||||
buf := make([]byte, blob.Length)
|
buf := make([]byte, blob.Length)
|
||||||
data, err := repo.LoadBlob(blob.Type, id, buf)
|
data, err := repo.LoadBlob(id, pack.Data, buf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user