-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
[Bug]: "invalid Zip archive: Could not find central directory end" on Linux #770
Comments
This should be fixed in Komac v2.4.0 as there has been lots of fixes to do with the central directory in the zip library that komac uses. I'll leave this open to confirm that that's the case. |
I've tried a release build with zip upgraded to v2.1.6 but it still doesn't work. Debug builds work in some conditions. |
Well, with Komac v2.4.0 it even panicked. https://github.com/stevenlele/winget-update/actions/runs/10511182019/job/29121548856 |
Thanks for the quick test @stevenlele. This issue wasn't to do with the zip but occured when fetching an existing pull request. I've released v2.4.1 to address this. |
Now back to "invalid Zip archive: No valid central directory found" again. https://github.com/stevenlele/winget-update/actions/runs/10511819731/job/29123663650 |
This is as expected. I'll report this to the underlying library as it works on Windows and presumably macOS. |
I can confirm that it does not in fact work on macOS: Using
|
Could you possibly test a nightly build, please? I reckon that this is potentially because on unix systems, the end of the file download may be being stored in a buffer and not being fully written before it gets read. For most files this issue wouldn't arise but to read the central directory, you need to read at the end of the file. I've made a commit that ensures that the download has been fully written to disk before proceeding. |
I can also confirm that it works on macOS as well using the nightly build. |
Is there an existing issue for this?
What happened?
https://github.com/stevenlele/winget-update/actions/runs/10461236814/job/28969123177
I've tested that it works correctly on Windows.
The text was updated successfully, but these errors were encountered: