Skip to content

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

Fix issue with deleting temp folder

Nayam Amarshea6c9c5a20d44
diff --git a/electron/commands/batch-upscayl.ts b/electron/commands/batch-upscayl.ts
index 8e25419..65f73a4 100644
--- a/electron/commands/batch-upscayl.ts
+++ b/electron/commands/batch-upscayl.ts
@@ -137,6 +137,17 @@ const batchUpscayl = async (event, payload: BatchUpscaylPayload) => {
logit("🚫 Skipping scaling and converting");
mainWindow.setProgressBar(-1);
mainWindow.webContents.send(COMMAND.FOLDER_UPSCAYL_DONE, outputDir);
+ rmdir(
+ tempDirectory,
+ {
+ recursive: true,
+ },
+ (err) => {
+ if (err) {
+ logit("🚫 Error deleting temp folder", err);
+ }
+ }
+ );
return;
}