Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d6a111e

Browse files
committed
Fix for boundary case (Jack)
1 parent 7806c16 commit d6a111e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Lib/macpath.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ def split(s):
4545
colon = 0
4646
for i in range(len(s)):
4747
if s[i] == ':': colon = i+1
48-
return s[:colon-1], s[colon:]
48+
path, file = s[:colon-1], s[colon:]
49+
if path and not ':' in path:
50+
path = path + ':'
51+
return path, file
4952

5053

5154
# Split a path in root and extension.

0 commit comments

Comments
 (0)