Hirokazu Yamamoto <ocean-c...@m2.ccsnet.ne.jp> added the comment: 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" ---------- nosy: +ocean-city _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5692> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com