added unzip error handler

This commit is contained in:
4nshuman
2024-10-06 20:23:10 +05:30
parent a79cc040e8
commit 2a82579eb8
+8 -1
View File
@@ -2187,7 +2187,14 @@ window.unzipItem = async function(itemPath) {
let file = await blobToUint8Array(await puter.fs.read(filePath));
terminateOp = fflate.unzip(file, async (err, unzipped) => {
if(err) {
UIAlert(e.message);
// close progress window
clearTimeout(progwin_timeout);
setTimeout(() => {
progwin?.close();
}, Math.max(0, window.copy_progress_hide_delay - (Date.now() - start_ts)));
}
});
}