mirror of
https://github.com/python/cpython.git
synced 2024-11-26 03:14:27 +08:00
Fix for boundary case (Jack)
This commit is contained in:
parent
7806c16650
commit
d6a111e2dd
@ -45,7 +45,10 @@ def split(s):
|
||||
colon = 0
|
||||
for i in range(len(s)):
|
||||
if s[i] == ':': colon = i+1
|
||||
return s[:colon-1], s[colon:]
|
||||
path, file = s[:colon-1], s[colon:]
|
||||
if path and not ':' in path:
|
||||
path = path + ':'
|
||||
return path, file
|
||||
|
||||
|
||||
# Split a path in root and extension.
|
||||
|
Loading…
Reference in New Issue
Block a user