mirror of
https://github.com/octoleo/restic.git
synced 2024-11-16 18:15:20 +00:00
Merge pull request #835 from restic/fix-834
Allow filtering absolute paths
This commit is contained in:
commit
1d64a1dcbb
@ -116,11 +116,11 @@ func (res *Restorer) restoreNodeTo(node *Node, dir string, dst string, idx *Hard
|
||||
return nil
|
||||
}
|
||||
|
||||
// RestoreTo creates the directories and files in the snapshot below dir.
|
||||
// RestoreTo creates the directories and files in the snapshot below dst.
|
||||
// Before an item is created, res.Filter is called.
|
||||
func (res *Restorer) RestoreTo(dir string) error {
|
||||
func (res *Restorer) RestoreTo(dst string) error {
|
||||
idx := NewHardlinkIndex()
|
||||
return res.restoreTo(dir, "", *res.sn.Tree, idx)
|
||||
return res.restoreTo(dst, string(filepath.Separator), *res.sn.Tree, idx)
|
||||
}
|
||||
|
||||
// Snapshot returns the snapshot this restorer is configured to use.
|
||||
|
Loading…
Reference in New Issue
Block a user