use os.Remove if path already exists on symlink restore

This commit is contained in:
Jerome Küttner 2022-09-14 08:14:31 +02:00
parent 6f3883c9d2
commit ef618bdd3f
1 changed files with 1 additions and 1 deletions

View File

@ -300,7 +300,7 @@ func (node Node) createSymlinkAt(path string) error {
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")
}