classification
Title: 'python -mzipfile -c' does not zip empty directories
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder: python -mzipfile fails to add empty folders to created zip
View: 22219
Assigned To: Nosy List: ryantimwilson, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2014-08-19 17:37 by ryantimwilson, last changed 2014-08-19 17:40 by serhiy.storchaka. This issue is now closed.

Files
File name Uploaded Description Edit
add_empty_dirs_to_zipfile.patch ryantimwilson, 2014-08-19 17:37 review
Messages (2)
msg225535 - (view) Author: Ryan Wilson (ryantimwilson) * Date: 2014-08-19 17:37
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 zip empty directories.

Running 'unzip foo.zip' also produces:
Archive:  foo.zip
warning [foo.zip]:  zipfile is empty

The following posted patch fixes this issue.
msg225536 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-08-19 17:40
This is a duplicate of issue22219.
History
Date User Action Args
2014-08-19 17:40:45serhiy.storchakasetstatus: open -> closed

superseder: python -mzipfile fails to add empty folders to created zip

nosy: + serhiy.storchaka
messages: + msg225536
resolution: duplicate
stage: resolved
2014-08-19 17:37:14ryantimwilsoncreate