Skip to content
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.

Commit

Permalink
馃悰Added missing error event handler (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
aileen committed May 11, 2018
1 parent 4fe49d6 commit b283486
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.js
Expand Up @@ -34,6 +34,14 @@ module.exports = function (zipPath, opts, cb) {

zipfile.readEntry()

zipfile.on('error', function (err) {

This comment has been minimized.

Copy link
@ErisDS

ErisDS Jan 1, 2019

Member

@AileenCGN as part of cleanup, please can you PR this back to the main project?

We don't actually use this in Ghost, only in gscan, and it's now behind the main project.

Alternatively, we could look to switch to using adm-zip everywhere (used in Ghost-CLI and migrate)

This comment has been minimized.

Copy link
@aileen

aileen Jan 3, 2019

Author Member

@ErisDS There is an open issue here and already two PR's (here and here) to close it (basically with the same changes I did here). In both cases, the maintainer is not responding. The module doesn't appear to be maintained recently, so maybe a good option to switch to using adm-zip like you suggested.

cancelled = true
if (err) {
return cb(err)
}
return cb(new Error('Error reading zip file'))
})

zipfile.on('close', function () {
if (!cancelled) {
debug('zip extraction complete')
Expand Down

0 comments on commit b283486

Please sign in to comment.