1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-12 01:40:53 +01:00

Refactor file path and remove unnecessary code

This commit is contained in:
Nayam Amarshe 2024-01-15 18:20:36 +05:30
parent a80f85a069
commit 3ed4638aa5

View File

@ -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,