Fix extract when fileName is a directory#7599
Fix extract when fileName is a directory#7599f111fei wants to merge 1 commit intomicrosoft:masterfrom
Conversation
|
By analyzing the blame information on this pull request, we identified @egamma and @joaomoreno to be potential reviewers |
|
@f111fei I took your suggestion from #8044 and started writing tests for The first (and only, so far) test tries to extract the file you appended to this PR. The test seemed to pass successfully... I then realised the file you provided didn't cause the issue. It needs to be a zip file containing an empty directory. I've updated the test and then it started failing. |
|
Your fix got close, but there was still the problem of opening the stream of an empty directory: the extract would never end. I've pushed another commit on top. For some idiotic reason I failed to properly preserve history and ended up not merging this properly and did a rebase instead. You still appear as a committer, though: 74b8236 Thanks for your help! 🎆 Great job! 🍻 |
See https://github.com/thejoshwolfe/yauzl/blob/master/README.md
If
entry.fileNameis a directory name, extracting will be failed.Here is a test file.
https://github.com/f111fei/test-files/raw/master/test.zip
The case has
4entries.