Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@ export class Reader {
async close() {
if (this.#closePromise) return this.#closePromise
this.#closePromise = (async () => {
const zip = await this.#zipPromise
// #zipPromise can reject if the file couldn't be opened. Our patch for
// yauzl-promise ensures the zip file is closed in that case, so we can
// just ignore any open error when closing.
const zip = await this.#zipPromise.catch(noop)
if (!zip) return
await zip.close()
})()
return this.#closePromise
Expand Down
Loading
Loading