adm-zip
adm-zip copied to clipboard
`extractAllToAsync` callback need to wait for the writing to finish
v0.5.6
zip.extractAllToAsync(output, true, err => {
/* istanbul ignore if */
if (err != null) throw err
resolve()
})
ref: https://github.com/cthackers/adm-zip/blob/3caa15d50b54d19a2212a11b5a6c86d89caa4a77/adm-zip.js#L668
Agreed. The callback should wait all extracting tasks finished. And then it could be converted to the modern promise friendly, using promisify.
#393 I submit a PR to fix it. Hope it works.
Yes It seems to work, nice work.
I merged PR, but I dont have access to npm.
I'm pretty sure this changing is causing the callback to never trigger now. An operation that was working now hangs indefinitely.
https://github.com/cthackers/adm-zip/issues/407#issuecomment-990086783) - a workaround