mirror of
https://github.com/restic/restic.git
synced 2025-08-25 03:47:25 +00:00
Load the index and search subtree
This commit is contained in:
@@ -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 != "" {
|
||||
|
Reference in New Issue
Block a user