From cff6fea32a0daccab9d3a9b9c3bf83b2f3a5b594 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 4 Aug 2016 18:02:32 +0200 Subject: [PATCH] Fix 'cat' command --- src/cmds/restic/cmd_cat.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cmds/restic/cmd_cat.go b/src/cmds/restic/cmd_cat.go index e3fdebe4c..58e5dc452 100644 --- a/src/cmds/restic/cmd_cat.go +++ b/src/cmds/restic/cmd_cat.go @@ -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 }