summaryrefslogtreecommitdiffstats
path: root/Lib/zipfile.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-05-02 17:33:01 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-05-02 17:33:01 (GMT)
commit62821691426f06cf7632b28d730e405fa31dead7 (patch)
tree881446a2402d8f8c4e0cb64d425d78ed41990bac /Lib/zipfile.py
parent92b970037b12cc3471c9db48959af071351cffee (diff)
downloadcpython-62821691426f06cf7632b28d730e405fa31dead7.zip
cpython-62821691426f06cf7632b28d730e405fa31dead7.tar.gz
cpython-62821691426f06cf7632b28d730e405fa31dead7.tar.bz2
remove py3k compat code
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r--Lib/zipfile.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
index 3106353..3147f98 100644
--- a/Lib/zipfile.py
+++ b/Lib/zipfile.py
@@ -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