[issue22230] 'python -mzipfile -c' does not zip empty directories

2014-08-19 Thread Ryan Wilson
New submission from Ryan Wilson: Running command: $ mkdir foo; python -mzipfile -c foo.zip foo; python -mzipfile -e foo.zip dest ls: cannot access dest: No such file or directory This is because 'foo.zip' is empty since running 'python -mzipfile -c foo.zip foo' does not z

[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&#x