We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9afa50f commit 240ce04Copy full SHA for 240ce04
Lib/pathlib/_local.py
@@ -1128,7 +1128,7 @@ def move(self, target):
1128
"""
1129
Recursively move this file or directory tree to the given destination.
1130
1131
- # Use os.rename() if the target is os.PathLike and on the same FS.
+ # Use os.replace() if the target is os.PathLike and on the same FS.
1132
try:
1133
target_str = os.fspath(target)
1134
except TypeError:
@@ -1138,7 +1138,7 @@ def move(self, target):
1138
target = self.with_segments(target_str)
1139
target.copy._ensure_different_file(self)
1140
1141
- os.rename(self, target_str)
+ os.replace(self, target_str)
1142
return target
1143
except OSError as err:
1144
if err.errno != EXDEV:
0 commit comments