forked from TrueCloudLab/restic
Fix commands
This commit is contained in:
parent
76074839cf
commit
11d6aa5328
2 changed files with 3 additions and 3 deletions
|
@ -70,7 +70,7 @@ func archive_dir(repo *khepri.DirRepository, path string) (khepri.ID, error) {
|
|||
|
||||
var buf bytes.Buffer
|
||||
t.Save(&buf)
|
||||
id, err := repo.PutRaw(buf.Bytes())
|
||||
id, err := repo.PutRaw(khepri.TypeRef, buf.Bytes())
|
||||
|
||||
if err != nil {
|
||||
log.Printf("error saving tree to repo: %v", err)
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
func restore_file(repo *khepri.DirRepository, node khepri.Node, target string) error {
|
||||
fmt.Printf(" restore file %q\n", target)
|
||||
|
||||
rd, err := repo.Get(node.Content)
|
||||
rd, err := repo.Get(khepri.TypeBlob, node.Content)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ func restore_file(repo *khepri.DirRepository, node khepri.Node, target string) e
|
|||
|
||||
func restore_dir(repo *khepri.DirRepository, id khepri.ID, target string) error {
|
||||
fmt.Printf(" restore dir %q\n", target)
|
||||
rd, err := repo.Get(id)
|
||||
rd, err := repo.Get(khepri.TypeRef, id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue