forked from TrueCloudLab/restic
use os.Remove if path already exists on symlink restore
This commit is contained in:
parent
6f3883c9d2
commit
ef618bdd3f
1 changed files with 1 additions and 1 deletions
|
@ -300,7 +300,7 @@ func (node Node) createSymlinkAt(path string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := os.RemoveAll(path); err != nil && !errors.Is(err, os.ErrNotExist) {
|
if err := os.Remove(path); err != nil && !errors.Is(err, os.ErrNotExist) {
|
||||||
return errors.Wrap(err, "Symlink")
|
return errors.Wrap(err, "Symlink")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue