aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/pathlib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/pathlib.py')
-rw-r--r--Lib/pathlib.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/pathlib.py b/Lib/pathlib.py
index c8931687a3c..8cb5279d735 100644
--- a/Lib/pathlib.py
+++ b/Lib/pathlib.py
@@ -300,6 +300,9 @@ class PurePath(os.PathLike):
for arg in args:
if isinstance(arg, PurePath):
path = arg._raw_path
+ if arg._flavour is ntpath and self._flavour is posixpath:
+ # GH-103631: Convert separators for backwards compatibility.
+ path = path.replace('\\', '/')
else:
try:
path = os.fspath(arg)