2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-30 08:44:02 +00:00

Load the index and search subtree

This commit is contained in:
Chapuis Bertil 2015-08-27 23:21:44 +02:00
parent b188217e83
commit d4686ebcc5

View File

@ -94,7 +94,7 @@ func (c CmdFind) findInTree(repo *repository.Repository, id backend.ID, path str
} }
if node.Type == "dir" { if node.Type == "dir" {
subdirResults, err := c.findInTree(repo, id, filepath.Join(path, node.Name)) subdirResults, err := c.findInTree(repo, *node.Subtree, filepath.Join(path, node.Name))
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -168,6 +168,11 @@ func (c CmdFind) Execute(args []string) error {
return err return err
} }
err = repo.LoadIndex()
if err != nil {
return err
}
c.pattern = args[0] c.pattern = args[0]
if c.Snapshot != "" { if c.Snapshot != "" {