Skip to content

πŸ†™ Upscayl - #1 Free and Open Source AI Image Upscaler for Linux, MacOS and Windows.

Fix batch mode upscayl

Nayam Amarshe00520494cdfd
diff --git a/electron/commands/batch-upscayl.ts b/electron/commands/batch-upscayl.ts
index 20ed89d..efce465 100644
--- a/electron/commands/batch-upscayl.ts
+++ b/electron/commands/batch-upscayl.ts
@@ -159,6 +159,7 @@ const batchUpscayl = async (event, payload: BatchUpscaylPayload) => {
}
});
mainWindow.webContents.send(COMMAND.FOLDER_UPSCAYL_DONE, outputDir);
+ fs.rmdirSync(tempDirectory, { recursive: true });
} catch (error) {
logit("❌ Error processing (scaling and converting) the image.", error);
upscayl.kill();
@@ -168,12 +169,12 @@ const batchUpscayl = async (event, payload: BatchUpscaylPayload) => {
"Error processing (scaling and converting) the image. Please report this error on Upscayl GitHub Issues page.\n" +
error
);
+ fs.rmdirSync(tempDirectory, { recursive: true });
}
} else {
upscayl.kill();
}
};
-
upscayl.process.stderr.on("data", onData);
upscayl.process.on("error", onError);
upscayl.process.on("close", onClose);