2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-01 00:20:48 +00:00

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

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")
}