EvanOxfeld / node-unzip

node.js cross-platform unzip using streams
MIT License
613 stars 343 forks source link

Fixed issue 37, where entry.size is undefined. #92

Open filtersweep opened 8 years ago

filtersweep commented 8 years ago

This is just a real quick first pass, with little knowledge of the rest of the codebase. The crux of the issue is that entry.size is unassigned before the "entry" event is emitted. I couldn't find anywhere where vars.uncompressedSize and vars.flags are re-assigned between the initial assignment and the usage after fileSizeKnown. So, I just moved that block up before "entry" is emitted.