mirror of
https://github.com/upscayl/upscayl.git
synced 2024-11-28 01:10:52 +01:00
fixed error on windows
This commit is contained in:
parent
f4a3b79830
commit
efab7018b0
@ -5,6 +5,7 @@ const { spawn } = require("child_process");
|
||||
const fs = require("fs");
|
||||
const sizeOf = require("image-size");
|
||||
const { autoUpdater } = require("electron-updater");
|
||||
const { getPlatform } = require("./getPlatform");
|
||||
|
||||
const { execPath, modelsPath } = require("./binaries");
|
||||
|
||||
@ -105,7 +106,10 @@ ipcMain.on(commands.UPSCAYL, async (event, payload) => {
|
||||
let outputDir = payload.outputPath;
|
||||
|
||||
// COPY IMAGE TO upscaled FOLDER
|
||||
const fullfileName = payload.imagePath.split("/").slice(-1)[0];
|
||||
const platform = getPlatform()
|
||||
const fullfileName = platform === 'win'
|
||||
? payload.imagePath.split("\\").slice(-1)[0]
|
||||
: payload.imagePath.split("/").slice(-1)[0]
|
||||
const fileName = parse(fullfileName).name;
|
||||
const fileExt = parse(fullfileName).ext;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user