Add checks for Server.Load(), use Blob for load

This commit is contained in:
Alexander Neumann committed 2015-03-28 15:07:08 +01:00
1 parent 5e69788eac
commit f157f775da
16 files changed
+120 -131

No files matched your search

+3 -3
View File
@@ -76,7 +76,7 @@ func (cmd CmdCat) Execute(args []string) error {
case "tree":
// try storage id
tree := &restic.Tree{}
err := s.LoadJSONID(backend.Tree, id.String(), tree)
err := s.LoadJSONID(backend.Tree, id, tree)
if err != nil {
return err
}
@@ -91,7 +91,7 @@ func (cmd CmdCat) Execute(args []string) error {
return nil
case "snapshot":
sn := &restic.Snapshot{}
err = s.LoadJSONID(backend.Snapshot, id.String(), sn)
err = s.LoadJSONID(backend.Snapshot, id, sn)
if err != nil {
return err
}
@@ -105,7 +105,7 @@ func (cmd CmdCat) Execute(args []string) error {
return nil
case "key":
rd, err := s.Get(backend.Key, id.String())
rd, err := s.Backend().Get(backend.Key, id.String())
if err != nil {
return err
}