-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File handle is never closed when zip file is unreadable #96
Comments
skorczan
pushed a commit
to skorczan/node-stream-zip
that referenced
this issue
Mar 19, 2024
…nd async API was used to access it
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider the following code example when using the async API:
When 'unreadable.zip' is not readable (e.g. a nearly empty text file), this code will leak a file handle to "unreadable.zip". This only happens with the promised-based API, not with the callback-based one.
The reason is found within the
async close()
method:node-stream-zip/node_stream_zip.js
Line 748 in 7c5d503
The first line will already throw an exception if the zip file is completely unreadable. Therefore,
zip.close()
will never get called.The text was updated successfully, but these errors were encountered: