rs-async-zip icon indicating copy to clipboard operation
rs-async-zip copied to clipboard

Regression: cannot loop over entries in ZIP archives after upgrading to v0.0.8

Open citreae535 opened this issue 2 years ago • 1 comments

I'm using this crate to loop over entries in ZIP archives and extract them. It works as expected on version 0.0.7. However, after upgrading to version 0.0.8, the same function would sometimes fail with error Encountered an unexpected header (actual: 0x0, expected: 0x6054b50) . I noticed that those "bad" archives have one thing in common: they contain no dir entries but still have a path structure, i.e., "folder/file.ext" exists, but "folder" does not exist. I believe this is what caused the regression.

citreae535 avatar Aug 01 '22 10:08 citreae535

This has been fixed in the latest git version https://github.com/Majored/rs-async-zip/issues/29 @Majored Could you put out a new crate release that includes @JonathanxD's fix?

mobad avatar Aug 01 '22 21:08 mobad

@citreae535 Would you be able to provide a ZIP file that replicates this issue so we can confirm that @JonathanxD's fix resolves your specific issue?

Majored avatar Oct 07 '22 15:10 Majored

I've just upgraded to v0.0.9 and the issue is resolved. Thanks! By the way, it looks like the repo does not have a ZIP file extraction example yet. Since I'm using this crate for that purpose, I could provide one if that's desirable.

citreae535 avatar Oct 09 '22 04:10 citreae535

Great, and feel free to submit any examples you think would be helpful! Ideally, just make sure they're as minimal as possible.

Majored avatar Oct 09 '22 11:10 Majored