mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
remove py3k compat code
This commit is contained in:
parent
92b970037b
commit
6282169142
3 changed files with 10 additions and 64 deletions
|
@ -952,7 +952,9 @@ class ZipFile:
|
|||
"""
|
||||
# build the destination pathname, replacing
|
||||
# forward slashes to platform specific separators.
|
||||
if targetpath[-1:] in (os.path.sep, os.path.altsep):
|
||||
# Don't strip it if it is a drive.
|
||||
if targetpath[-1:] in (os.path.sep, os.path.altsep) and \
|
||||
not (len(targetpath) > 1 and targetpath[-2] == ":"):
|
||||
targetpath = targetpath[:-1]
|
||||
|
||||
# don't include leading "/" from file name if present
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue