bower / decompress-zip

Module that decompresses zip files
MIT License
102 stars 76 forks source link

decompressing a unix zip fails if external file attribute is 0 #71

Open shadargee1982 opened 3 years ago

shadargee1982 commented 3 years ago

We've run into a situation where an archive created on Unix can sometimes create a zip file where the external file attribute is 0. This causes this line to fail since 0 isn't in the list of types. Much like how archives created in Windows type property defaults to 'File', the Unix decompression should as well.

sheerun commented 3 years ago

You're using decompress-zip directly or through some other software?

shadargee1982 commented 3 years ago

using it in an AzureDev Ops pipeline task. The platform spins up a Unix machine, installs the necessary libraries (decompress-zip), and then essentiall calls extract. Snippet:

var unzipper = new DecompressZip(zipLocation);
...
unzipper.extract({
    path: unzipLocation
});
shadargee1982 commented 3 years ago

@sheerun - I've submitted a PR for this issue. Can you please take a look?