decompress-zip icon indicating copy to clipboard operation
decompress-zip copied to clipboard

decompressing a unix zip fails if external file attribute is 0

Open shadargee1982 opened this issue 4 years ago • 3 comments

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.

shadargee1982 avatar Nov 25 '20 21:11 shadargee1982

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

sheerun avatar Nov 25 '20 22:11 sheerun

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 avatar Nov 25 '20 22:11 shadargee1982

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

shadargee1982 avatar Jan 04 '21 21:01 shadargee1982