Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix for #15 for compressing large files
This is a potential quick fix for Issue #15 which occurs when attempting to compress files larger than ZIP64_LIMIT. `zinfo.file_size` is never initialized to the correct file size and thus the determination of whether zip64 is required is made based on the file size of 0. This later results in an exception being raised as though the file size increased during compression, since the file size is actually counted during compression and later saved over `zinfo.file_size`. It is important to note that this fix may not be cross platform. Different versions of Python do different things on Windows with the `st_size` parameter in the `os.stat` call. So, that may be worth investigating further. However, in the short term, this will fix the problem on Linux, Mac, and some Windows platforms without making it worse where it still doesn't work. I would leave it to the maintainers to make a broader decision on whether this fix is appropriate or if a better solution would be desired. I'm happy to help.
- Loading branch information