Skip to content

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

Refactor file path and remove unnecessary code

Nayam Amarshe3ed4638aa5f9
diff --git a/electron/commands/batch-upscayl.ts b/electron/commands/batch-upscayl.ts
index 8a748f3..67c32de 100644
--- a/electron/commands/batch-upscayl.ts
+++ b/electron/commands/batch-upscayl.ts
@@ -141,18 +141,13 @@ const batchUpscayl = async (event, payload: BatchUpscaylPayload) => {
`${outputFolderPath}${slash}${removeFileExtension(
file
)}.${saveImageAs}`,
- `${outputFolderPath}/${removeFileExtension(file)}.${saveImageAs}`,
+ `${outputFolderPath}${slash}${removeFileExtension(
+ file
+ )}.${saveImageAs}`,
desiredScale,
saveImageAs,
onError
);
- // Remove the png file (default) if the saveImageAs is not png
- if (saveImageAs !== "png") {
- logit("Removing output PNG");
- fs.unlinkSync(
- `${outputFolderPath}${slash}${removeFileExtension(file)}.png`
- );
- }
});
mainWindow.webContents.send(
COMMAND.FOLDER_UPSCAYL_DONE,