adm-zip
adm-zip copied to clipboard
onFail is never called in toBuffer(onSuccess, onFail, onItemStart, onItemEnd)
The root module has a toBuffer()
method with an onFail
param that is passed to _zip.toAsyncBuffer()
:
https://github.com/cthackers/adm-zip/blob/576f7c5a5ccd529c75c0c7cf870a69856d99ca3a/adm-zip.js#L539
ZipFile.toAsyncBuffer()
has an onFail
param that is not used:
https://github.com/cthackers/adm-zip/blob/576f7c5a5ccd529c75c0c7cf870a69856d99ca3a/zipFile.js#L229
Currently, I have an issue where this exception is being thrown in loadDataHeaderFromBinary()
:
https://github.com/cthackers/adm-zip/blob/576f7c5a5ccd529c75c0c7cf870a69856d99ca3a/headers/entryHeader.js#L112-L114
Ultimately, this should cause onFail()
to be called, but that does not happen, so I get an exception with a stacktrace that was very difficult to debug.