Skip to content

Commit 5f29ad3

Browse files
committed
ntpath: Try fix concatenate UNC paths
1 parent 82db423 commit 5f29ad3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Lib/ntpath.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ def _get_colon(path):
6262
else:
6363
return ':'
6464

65+
def _get_colon_seps(path):
66+
if isinstance(path, bytes):
67+
return b':'+bsep+baltsep
68+
else:
69+
return ':'+sep+altsep
70+
6571
def _get_unc_prefix(path):
6672
if isinstance(path, bytes):
6773
return b'\\\\?\\UNC\\'
@@ -125,7 +131,7 @@ def join(path, *paths):
125131
path = os.fspath(path)
126132
sep = _get_sep(path)
127133
seps = _get_bothseps(path)
128-
colon_seps = _get_colon(path)
134+
colon_seps = _get_colon_seps(path)
129135
try:
130136
result_drive, result_root, result_path = splitroot(path)
131137
for p in paths:

0 commit comments

Comments
 (0)