mirror of
https://github.com/octoleo/restic.git
synced 2024-11-24 21:57:41 +00:00
Fix commands
This commit is contained in:
parent
76074839cf
commit
11d6aa5328
@ -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 New Issue
Block a user