You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the ZIP files are now scanned during the call to open, I can no longer listen for error events from readEntry, and therefore I can't ignore ones I don't care about (such as absolute/relative paths). Instead, the error will be passed to the callback provided to the open method.
When supportMacArchiveUtility is true with the attached zip file containing an absolute path, I never have the opportunity to handle the error event.
I think you could defer scanning for the central directory until the first call to readEntry, but even then I'm not sure I could still ignore errors I don't care about with the way the events are being intercepted -- currently if I want to "ignore" an error I set errorEmitted back to false and perform another call to readEntry.
I was able to work around this in a fairly ugly fashion by adding an "error filter" function to a forked version of yauzl which allows me to ignore errors at that level, but it would be nice to not have to fork yauzl, particularly if yauzl-mac is designed to be a drop in replacement.
(Continuing discussion from thejoshwolfe/yauzl#69)
Since the ZIP files are now scanned during the call to
open
, I can no longer listen forerror
events fromreadEntry
, and therefore I can't ignore ones I don't care about (such as absolute/relative paths). Instead, the error will be passed to the callback provided to theopen
method.I am doing something like:
When
supportMacArchiveUtility
is true with the attached zip file containing an absolute path, I never have the opportunity to handle theerror
event.I think you could defer scanning for the central directory until the first call to
readEntry
, but even then I'm not sure I could still ignore errors I don't care about with the way the events are being intercepted -- currently if I want to "ignore" an error I seterrorEmitted
back to false and perform another call toreadEntry
.I was able to work around this in a fairly ugly fashion by adding an "error filter" function to a forked version of yauzl which allows me to ignore errors at that level, but it would be nice to not have to fork yauzl, particularly if yauzl-mac is designed to be a drop in replacement.
entry-error.zip
The text was updated successfully, but these errors were encountered: