summaryrefslogtreecommitdiffstats
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 bfe26e1..a42085e 100644
--- a/Lib/pathlib.py
+++ b/Lib/pathlib.py
@@ -300,6 +300,9 @@ class PurePath(object):
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)