ZipWriter and TarWriter open too many files at once
Closed this issue · 1 comments
charonn0 commented
Expected behavior
Being able to create zip archives with thousands of files, at least up to the standard limit of 65,535 entries, and TAR archives with an infinite number of entries.
Actual behavior
Depending on the system configuration and the number of files in the archive, creating the archive may fail with an IOException.
Steps to reproduce the behavior
Add more entries to the archive than the maximum number of files the OS allows to have open at once.
charonn0 commented
When adding entries to a zip archive, the ZipWriter class opens each file and holds it open until the entry is removed or the ZipWriter is destroyed. ZipWriter should be refactored to open and close files more economically.