Voxelum / minecraft-launcher-core-node

Provide packages to install Minecraft, launch Minecraft and more to build launcher with NodeJs/Electron!
https://docs.xmcl.app/en/core/
MIT License
174 stars 25 forks source link

Fix a resource leak in the @xmcl/mod-parser package #256

Closed Tomate0613 closed 1 year ago

Tomate0613 commented 1 year ago

I noticed that running the following script caused an error when deleting the test folder in Windows file explorer because the stream was not closed:

const { readFabricMod } = require('@xmcl/mod-parser');

(async () => { await readFabricMod('./test/test.jar');

// keep the program alive setInterval(() => { }, 1000); })();

The fix should prevent the error from occurring.