mirror of
https://github.com/octoleo/restic.git
synced 2024-11-22 12:55:18 +00:00
Don't skip subtree on false filter condition when restoring
We still need to descend into subtrees and check if their filter matches.
This commit is contained in:
parent
190b1cdcc7
commit
ccada7d89a
13
restorer.go
13
restorer.go
@ -51,15 +51,14 @@ func (res *Restorer) to(dir string, tree_id backend.ID) error {
|
|||||||
|
|
||||||
for _, node := range tree {
|
for _, node := range tree {
|
||||||
p := filepath.Join(dir, node.Name)
|
p := filepath.Join(dir, node.Name)
|
||||||
if !res.Filter(p, node) {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
err := node.CreateAt(res.ch, p)
|
if res.Filter(p, node) {
|
||||||
if err != nil {
|
err := node.CreateAt(res.ch, p)
|
||||||
err = res.Error(p, node, arrar.Annotate(err, "create node"))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
err = res.Error(p, node, arrar.Annotate(err, "create node"))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user