mirror of
https://github.com/octoleo/restic.git
synced 2024-11-26 23:06:32 +00:00
Load the index and search subtree
This commit is contained in:
parent
b188217e83
commit
d4686ebcc5
@ -94,7 +94,7 @@ func (c CmdFind) findInTree(repo *repository.Repository, id backend.ID, path str
|
||||
}
|
||||
|
||||
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 {
|
||||
return nil, err
|
||||
}
|
||||
@ -168,6 +168,11 @@ func (c CmdFind) Execute(args []string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
err = repo.LoadIndex()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
c.pattern = args[0]
|
||||
|
||||
if c.Snapshot != "" {
|
||||
|
Loading…
Reference in New Issue
Block a user