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
Consider the following code example when using the async API:
const zip = new StreamZip.async({file: 'unreadable.zip', storeEntries: true });
try {
await zip.entries();
} finally {
await zip.close();
}
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:
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: