node-unzip
node-unzip copied to clipboard
no Directory entry caught on event "entry"
require('request')('https://github.com/yui/pure/releases/download/v0.3.0/pure-0.3.0.zip')
.pipe(unzip.Parse())
.on('entry', function(entry){
if (entry === 'Directory') {
console.log('directory found!');
}
})
there' s no Directory entry found.
I think it's:
if (entry.type === 'Directory') {
Edit: correct my mistake.
entry.path is the path - I think you are looking for (entry.type === 'Directory')
https://github.com/EvanOxfeld/node-unzip/blob/master/lib/parse.js#L96
@ZJONSSON sorry, my bad. Of course I meant the entry.type variable. I should stop commenting stuff late at night. 🥇