mirror of
https://github.com/restic/restic.git
synced 2026-10-16 06:37:12 +00:00
use os.Remove if path already exists on symlink restore
This commit is contained in:
1 parent
6f3883c9d2
commit
ef618bdd3f
1 file changed
+1
-1
@@ -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