diff --git a/src/renderer/src/progress/index.js b/src/renderer/src/progress/index.js index f303dabd2..212954f47 100644 --- a/src/renderer/src/progress/index.js +++ b/src/renderer/src/progress/index.js @@ -14,7 +14,7 @@ import { merge } from "../stories/pages/utils.js"; import { updateAppProgress, updateFile } from "./update.js"; import { updateURLParams } from "../../utils/url.js"; -import * as operations from './operations' +import * as operations from "./operations"; export * from "./update"; @@ -124,7 +124,7 @@ export const remove = async (name) => { focusCancel: true, }); - if (result.isConfirmed) return operations.remove(name) + if (result.isConfirmed) return operations.remove(name); return false; }; diff --git a/src/renderer/src/progress/operations.js b/src/renderer/src/progress/operations.js index 7cd8df54d..20ec92b2c 100644 --- a/src/renderer/src/progress/operations.js +++ b/src/renderer/src/progress/operations.js @@ -2,22 +2,21 @@ import { joinPath } from "../globals"; import { conversionSaveFolderPath, guidedProgressFilePath, stubSaveFolderPath } from "../dependencies/simple"; import { fs } from "../electron"; - export const remove = (name) => { - //Get the path of the progress file to delete - const progressFilePathToDelete = joinPath(guidedProgressFilePath, name + ".json"); + //Get the path of the progress file to delete + const progressFilePathToDelete = joinPath(guidedProgressFilePath, name + ".json"); - //delete the progress file - if (fs) fs.unlinkSync(progressFilePathToDelete); - else localStorage.removeItem(progressFilePathToDelete); + //delete the progress file + if (fs) fs.unlinkSync(progressFilePathToDelete); + else localStorage.removeItem(progressFilePathToDelete); - if (fs) { - // delete default stub location - fs.rmSync(joinPath(stubSaveFolderPath, name), { recursive: true, force: true }); + 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 }); - } + // delete default conversion location + fs.rmSync(joinPath(conversionSaveFolderPath, name), { recursive: true, force: true }); + } - return true; -} \ No newline at end of file + return true; +}; diff --git a/tests/progress.test.ts b/tests/progress.test.ts index 4e8e9da72..f00782f73 100644 --- a/tests/progress.test.ts +++ b/tests/progress.test.ts @@ -25,5 +25,3 @@ test('pipeline renaming works', () => rename(renameName, initialName)) // delete pipeline test('pipeline deletion works', () => remove(renameName)) - -