Skip to content

Commit c0447ff

Browse files
committed
Update logic when found colon in UNC
1 parent 00d328b commit c0447ff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/ntpath.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ def splitdrive(p):
146146
return p[:0], p
147147
if is_extended_unc(normp, colon):
148148
start = normp.find(sep, index + 1)
149-
index = normp.find(sep, start + 1)
149+
drive_colon = normp.find(colon, index + 1)
150+
if drive_colon == -1 or drive_colon > start:
151+
index = normp.find(sep, start + 1)
150152
index2 = normp.find(sep, index + 1)
151153
# a UNC path can't have two slashes in a row
152154
# (after the initial two)

0 commit comments

Comments
 (0)