Skip to content

Support upload of zero-size files #9

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

Merged
merged 1 commit into from
Feb 15, 2018
Merged

Conversation

g-a-d
Copy link
Contributor

@g-a-d g-a-d commented Feb 14, 2018

upload() on a zero-byte file fails as mmap throws a ValueError('cannot mmap an empty file').
This PR implements some logic to detect this condition and upload a zero-length file.

mmap fails on zero-byte files, so if we encounter one, skip mmapping and upload the empty string.
@AstinCHOI AstinCHOI merged commit 4919544 into akamai:master Feb 15, 2018
@AstinCHOI
Copy link
Contributor

Dear @g-a-d,
Thanks for your contribution!

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

Successfully merging this pull request may close these issues.

2 participants