mirror of
https://github.com/restic/restic.git
synced 2025-08-21 21:17:27 +00:00
use os.Remove if path already exists on symlink restore
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user