summaryrefslogtreecommitdiff
path: root/Lib/macpath.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-05-21 14:59:17 +0000
committerGuido van Rossum <guido@python.org>1997-05-21 14:59:17 +0000
commitd6a111e2dd257510069e46e5d8bb85abd80cf184 (patch)
tree2960c22070d1f31dfeb6b15a9b93612cb2bf56ed /Lib/macpath.py
parent7806c166503c0fa793dd0016478794b0a9f53cad (diff)
downloadcpython-git-d6a111e2dd257510069e46e5d8bb85abd80cf184.tar.gz
Fix for boundary case (Jack)
Diffstat (limited to 'Lib/macpath.py')
-rw-r--r--Lib/macpath.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/macpath.py b/Lib/macpath.py
index 8d2b18a68c..43bec56104 100644
--- a/Lib/macpath.py
+++ b/Lib/macpath.py
@@ -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.