New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shutil.make_archive doesn't archive empty directories #69170
Comments
Zip file is sometimes known to only contain files and the paths to them, but it can also have have empty folders, they are zero length files with a flag set. make_archive just ignores empty directories, I propose that there should either be a flag, or it should include empty directories by default. |
See also bpo-22219. I think we should fix this in shutil as well. |
Here is a patch. Should this be considered as a bug fix rather than new feature? |
I think it could be considered a bug fix, given that other archive programs, including zipfile itself, act in this way, and it is relatively unlikely that anyone is *depending* on make_archive not including empty directories (ie: that it would break their code if these directories were included). |
New changeset 705ec4145f06 by Serhiy Storchaka in branch '2.7': New changeset 19216f5f6ee0 by Serhiy Storchaka in branch '3.4': New changeset 142a5027ab3e by Serhiy Storchaka in branch '3.5': New changeset 6907716e7ccb by Serhiy Storchaka in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: