mirror of
https://github.com/restic/restic.git
synced 2024-12-24 08:44:52 +00:00
Allow filtering absolute paths
Before, the restorer called the filter function with a relative path, this prevented anchoring absolute patterns (which just never matched). Now call the restore function with an absolute virtual path, starting at the filepath separator. Closes #834
This commit is contained in:
parent
4f5e9e939b
commit
bf97cc7efa
1 changed files with 1 additions and 1 deletions
|
@ -120,7 +120,7 @@ func (res *Restorer) restoreNodeTo(node *Node, dir string, dst string, idx *Hard
|
|||
// Before an item is created, res.Filter is called.
|
||||
func (res *Restorer) RestoreTo(dir string) error {
|
||||
idx := NewHardlinkIndex()
|
||||
return res.restoreTo(dir, "", *res.sn.Tree, idx)
|
||||
return res.restoreTo(dir, string(filepath.Separator), *res.sn.Tree, idx)
|
||||
}
|
||||
|
||||
// Snapshot returns the snapshot this restorer is configured to use.
|
||||
|
|
Loading…
Reference in a new issue