This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ocean-city
Recipients benjamin.peterson, ocean-city, pitrou
Date 2009-04-04.20:08:35
SpamBayes Score 3.36398e-12
Marked as misclassified No
Message-id <1238875717.68.0.86927940028.issue5692@psf.upfronthosting.co.za>
In-reply-to
Content
This happens when running test from root directory. Following patch can
workaround this, but this code is there because it is needed, isn't it?
(Related to #4710?)

Index: Lib/zipfile.py
===================================================================
--- Lib/zipfile.py	(revision 71184)
+++ Lib/zipfile.py	(working copy)
@@ -957,11 +957,6 @@
         """Extract the ZipInfo object 'member' to a physical
            file on the path targetpath.
         """
-        # build the destination pathname, replacing
-        # forward slashes to platform specific separators.
-        if targetpath[-1:] in (os.path.sep, os.path.altsep):
-            targetpath = targetpath[:-1]
-
         # don't include leading "/" from file name if present
         if member.filename[0] == '/':
             targetpath = os.path.join(targetpath, member.filename[1:])


When targetpath is "C:/", targetpath becomes "C:" and os.path.join("C:",
"foo") returns "C:foo" instead of "C:/foo"
History
Date User Action Args
2009-04-04 20:08:37ocean-citysetrecipients: + ocean-city, pitrou, benjamin.peterson
2009-04-04 20:08:37ocean-citysetmessageid: <1238875717.68.0.86927940028.issue5692@psf.upfronthosting.co.za>
2009-04-04 20:08:36ocean-citylinkissue5692 messages
2009-04-04 20:08:35ocean-citycreate