From: Sjoerd Mullender Date: Wed, 14 Dec 1994 15:29:17 +0000 (+0000) Subject: Let extensions start at the last period after the last slash in the X-Git-Tag: v1.2b1~103 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=43598605179f6ac4640e5f074cab97d4cd54b488;p=thirdparty%2FPython%2Fcpython.git Let extensions start at the last period after the last slash in the name. --- diff --git a/Lib/posixpath.py b/Lib/posixpath.py index 6110f8e32471..73e380cec0da 100644 --- a/Lib/posixpath.py +++ b/Lib/posixpath.py @@ -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