mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Let extensions start at the last period after the last slash in the
name.
This commit is contained in:
parent
1cfb6b8992
commit
4359860517
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue