[issue22201] python -mzipfile fails to unzip files with folders created by zip

2014-08-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Applied first part of the patch. Thank you Ryan. For the rest please open separate issue. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue22201] python -mzipfile fails to unzip files with folders created by zip

2014-08-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset ffa5bfe75c3a by Serhiy Storchaka in branch '2.7': Issue #22201: Command-line interface of the zipfile module now correctly http://hg.python.org/cpython/rev/ffa5bfe75c3a New changeset 7b933005c492 by Serhiy Storchaka in branch '3.4': Issue #22201: Co

[issue22201] python -mzipfile fails to unzip files with folders created by zip

2014-08-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka stage: -> patch review type: -> behavior versions: +Python 2.7, Python 3.5 ___ Python tracker __

[issue22201] python -mzipfile fails to unzip files with folders created by zip

2014-08-16 Thread Ryan Wilson
Ryan Wilson added the comment: The reason behind this was that zipfile.py currently handles empty directories in zipfiles incorrectly. On lines 1774 - 1778 in Lib/zipfile.py: tgtdir = os.path.dirname(tgt) if not os.path.exists(tgtdir): os.makedirs(tgtdir) with open(tgt, 'wb') as fp: fp

[issue22201] python -mzipfile fails to unzip files with folders created by zip

2014-08-14 Thread Antony Lee
New submission from Antony Lee: With Python 3.4.1: $ mkdir foo; zip -r foo{,}; python -mzipfile -e foo.zip dest adding: foo/ (stored 0%) Traceback (most recent call last): File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.