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

Test for an archive with empty files #30

Open
eagleflo opened this issue Mar 17, 2014 · 7 comments
Open

Test for an archive with empty files #30

eagleflo opened this issue Mar 17, 2014 · 7 comments
Assignees

Comments

@eagleflo
Copy link
Owner

This was broken under Python 3 for a long time.

@eagleflo eagleflo self-assigned this Mar 17, 2014
@GraylinKim
Copy link
Collaborator

Do you need me to provide one of these? The archives I originally found the issue with are private but I can dig around and find one for this.

@eagleflo
Copy link
Owner Author

Sure, I'd appreciate if you could find a reasonably small archive with at least one empty file.

For legal reasons it has to be user-generated, though, and preferably with official tools such as game clients or map editors.

@eagleflo
Copy link
Owner Author

We could of course also create an artificial test-case archive if we can be sure that it matches what is found in the wild.

@MGatner
Copy link

MGatner commented Apr 28, 2018

Wow this has been open a long time. I ran into this issue try to extract_to_disk (from CLI, -x) from a Heroes or the Storm .StormReplay file. Actually all of these archives I've tested so far have a zero-byte file in them; I am glad to provide one or many as examples.
My fix has been to add a test for empty data before calling fwrite; I'll see if I can implement an example in this repo. I'm not sure where else the empty file(s) are an issue though.

@MGatner
Copy link

MGatner commented Apr 28, 2018

Ah actually it looks like this is fixed in the current version here! https://github.com/Blizzard/heroprotocol appears to have an old version of mpyq included which is causing the issue.
@eagleflo were there other issues with empty files other than writing to disk? I haven't run into them so far...

@eagleflo
Copy link
Owner Author

No, I think #28 fixed that.

@MGatner
Copy link

MGatner commented Apr 28, 2018 via email

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

No branches or pull requests

3 participants