max-mapper / extract-zip

Zip extraction written in pure JavaScript. Extracts a zip into a directory.
BSD 2-Clause "Simplified" License
388 stars 126 forks source link

Fails to extract directories (for some zips) #10

Closed mal closed 8 years ago

mal commented 8 years ago

Noticed here: https://github.com/mafintosh/electron-prebuilt/issues/57#issuecomment-140660022

Example zip: https://github.com/atom/electron/releases/download/v0.32.3/electron-v0.32.3-linux-x64.zip

This appears to stem from whether a directory is included in the zip's manifest(?).

test/cats.zip

[...]
/tmp/cat-extract-test/cats/
/tmp/cat-extract-test/cats/.DS_Store
/tmp/cat-extract-test/cats/deema3.5771930_std.JPG
/tmp/cat-extract-test/cats/Deema_019.204205705_std.jpg
/tmp/cat-extract-test/cats/empty/
/tmp/cat-extract-test/cats/gJqEYBs.jpg
/tmp/cat-extract-test/cats/orange/
[...]

vs

electron-v0.32.3-linux-x64.zip

[...]
/tmp/elec-extract-test/libgcrypt.so.11
/tmp/elec-extract-test/libnotify.so.4
/tmp/elec-extract-test/resources/atom.asar
[...]

Note the lack of a /tmp/elec-extract-test/resources/.

ducky427 commented 8 years ago

I've also just come across this bug via the exact same sequence.

max-mapper commented 8 years ago

Oops my bad, working on a fix now

max-mapper commented 8 years ago

fixed in 1.1.1

mal commented 8 years ago

Great, thanks!