]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Let extensions start at the last period after the last slash in the
authorSjoerd Mullender <sjoerd@acm.org>
Wed, 14 Dec 1994 15:29:17 +0000 (15:29 +0000)
committerSjoerd Mullender <sjoerd@acm.org>
Wed, 14 Dec 1994 15:29:17 +0000 (15:29 +0000)
name.

Lib/posixpath.py

index 6110f8e32471025e068cdedee2768612a14ca839..73e380cec0dad42a63e84d285a9f685738cac10d 100644 (file)
@@ -62,7 +62,12 @@ def splitext(p):
        for c in p:
                if c == '/':
                        root, ext = root + ext + c, ''
-               elif c == '.' or ext:
+               elif c == '.':
+                       if ext:
+                               root, ext = root + ext, c
+                       else:
+                               ext = c
+               elif ext:
                        ext = ext + c
                else:
                        root = root + c