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:
parent
a80f85a069
commit
3ed4638aa5
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user