diff --git a/src/renderer/src/dependencies/simple.js b/src/renderer/src/dependencies/simple.js index 95152a68f..97f8d2148 100644 --- a/src/renderer/src/dependencies/simple.js +++ b/src/renderer/src/dependencies/simple.js @@ -12,7 +12,11 @@ export const homeDirectory = app?.getPath("home") ?? ""; export const appDirectory = homeDirectory ? joinPath(homeDirectory, paths.root) : ""; export const guidedProgressFilePath = homeDirectory ? joinPath(appDirectory, ...paths.subfolders.progress) : ""; -export const stubSaveFolderPath = homeDirectory ? joinPath(homeDirectory, paths["root"], ...paths.subfolders.stubs) : ""; -export const conversionSaveFolderPath = homeDirectory ? joinPath(homeDirectory, paths["root"], ...paths.subfolders.conversions) : ""; +export const stubSaveFolderPath = homeDirectory + ? joinPath(homeDirectory, paths["root"], ...paths.subfolders.stubs) + : ""; +export const conversionSaveFolderPath = homeDirectory + ? joinPath(homeDirectory, paths["root"], ...paths.subfolders.conversions) + : ""; export const isStorybook = window.location.href.includes("iframe.html"); diff --git a/src/renderer/src/progress/index.js b/src/renderer/src/progress/index.js index 958c6da27..b3dfb9ea8 100644 --- a/src/renderer/src/progress/index.js +++ b/src/renderer/src/progress/index.js @@ -1,6 +1,13 @@ import Swal from "sweetalert2"; -import { guidedProgressFilePath, reloadPageToHome, isStorybook, appDirectory, stubSaveFolderPath, conversionSaveFolderPath } from "../dependencies/simple.js"; +import { + guidedProgressFilePath, + reloadPageToHome, + isStorybook, + appDirectory, + stubSaveFolderPath, + conversionSaveFolderPath, +} from "../dependencies/simple.js"; import { fs } from "../electron/index.js"; import { joinPath, runOnLoad } from "../globals.js"; import { merge } from "../stories/pages/utils.js"; @@ -123,13 +130,11 @@ export const remove = async (name) => { else localStorage.removeItem(progressFilePathToDelete); if (fs) { - // delete default stub location fs.rmSync(joinPath(stubSaveFolderPath, name), { recursive: true, force: true }); // delete default conversion location fs.rmSync(joinPath(conversionSaveFolderPath, name), { recursive: true, force: true }); - } return true;