Skip to content
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

Run filesize comparisons if not running in streaming mode. #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rmathure
Copy link

When streaming zip content using SMBHandler and not writing the data to a file(streaming data out instead), the check at https://github.com/allanlei/python-zipstream/blob/master/zipstream/__init__.py#L328 detects that the data transferred (filesize) is greater than ZIP64_LIMIT. The Zip64 flag even after being set during initialization, has the variable zip64 set to False which cause the RuntimeError 'File size has increased during compressing'.

This is my proposed solution: We should only check the file size or the compress size when we are writing to a file i.e. filename is specified.

This solution works for my use case where I am streaming in/out data but I leave the actual implementation to fix this bug to the authors.

@tombs
Copy link

tombs commented Oct 12, 2016

Hi, I've encountered the same issue. Fix recommended by rmathure works for me as well. Request that the pull request be approved or the base code updated. Thanks!

@rmathure
Copy link
Author

Any updates on this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants