Skip to content

Commit

Permalink
Fix: close zip after reading entry (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
emmercm authored Oct 8, 2022
1 parent a5a3a1e commit 8c69324
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/types/archives/zip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ export default class Zip extends Archive {
}

try {
return resolve(await callback(stream));
const result = await callback(stream);
stream.destroy();
zipFile.close();
return resolve(result);
} catch (callbackErr) {
return reject(callbackErr);
}
Expand Down

0 comments on commit 8c69324

Please sign in to comment.