]> granicus.if.org Git - python/commitdiff
Fix for boundary case (Jack)
authorGuido van Rossum <guido@python.org>
Wed, 21 May 1997 14:59:17 +0000 (14:59 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 21 May 1997 14:59:17 +0000 (14:59 +0000)
Lib/macpath.py

index 8d2b18a68c7216b22ac5df9b0786f16fe7c6c725..43bec56104d44d8aa82f035e823c5e3e5e8a626f 100644 (file)
@@ -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.