node-unzip icon indicating copy to clipboard operation
node-unzip copied to clipboard

handle finish and error events to avoid dead _flush loop

Open hellolwq opened this issue 7 years ago • 1 comments

samples.zip

sample zip files will cause unzip in dead _flush loop, handle the error and finish events can avoid this.

hellolwq avatar Jan 30 '18 15:01 hellolwq

fyi, your sample file works with an active fork unzipper

const request = require('request');
const unzipper = require('unzipper');

request('https://github.com/EvanOxfeld/node-unzip/files/1678258/samples.zip')
  .pipe(unzipper.Parse())
  .on('entry', entry => entry.autodrain())
  .promise()
  .then( () => console.log('done'), e => console.log('error',e));

ZJONSSON avatar Jan 30 '18 17:01 ZJONSSON