-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
error not caught when using async api to extract files #103
Comments
Hmm... are you sure it isn't working as expected? I see two problems with the provided sample; first you're executing When I modify the test slightly;
...it seems to work just as I would expect it to. Have I missed something? Edit: Grantedly, the file I tested this with was an empty file, so results might differ when using an actual zip-file... |
Thank you for your reply. You can try creating a new 5M disk and then extract a file larger than 5M using the extract api. You will receive an error like this |
After testing, I found that the callback api also has this issues const zip = new StreamZip({
file: "big.zip" // assume the big.zip is 50M
});
zip.on('ready', () => {
const outputPath = 'whatever' // assume the outputPath only left 10M space
zip.extract(null, outputPath , (err, count) => {
console.log(err ? 'Extract error' : `Extracted ${count} entries`);
zip.close();
});
}); |
same issue |
1 similar comment
same issue |
`
const StreamZip = require("node-stream-zip");
async function test() {
const zip = new StreamZip.async({
file: "C:\Users\Administrator\AppData\Roaming\xxxx\mods\443.zip",
});
try {
await zip.extract(null, "G:\Monster Hunter");
} catch (error) {
console.log(error);
}
console.log("-----");
}
test()
`
The text was updated successfully, but these errors were encountered: