From 30341d47a02532bc667dc04cb8640f999946cae6 Mon Sep 17 00:00:00 2001 From: Kuingsmile Date: Mon, 3 Jun 2024 16:23:46 +0800 Subject: [PATCH] :bug: Fix(custom): fix bug while using webp plugin ISSUES CLOSED: #205 --- src/main/apis/app/uploader/index.ts | 2 +- src/main/lifeCycle/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/apis/app/uploader/index.ts b/src/main/apis/app/uploader/index.ts index 33c9316..d345492 100644 --- a/src/main/apis/app/uploader/index.ts +++ b/src/main/apis/app/uploader/index.ts @@ -155,7 +155,7 @@ class Uploader { return false } finally { if (filePath) { - fse.unlink(filePath) + fse.remove(filePath) } } } diff --git a/src/main/lifeCycle/index.ts b/src/main/lifeCycle/index.ts index 0ce5304..bd72260 100644 --- a/src/main/lifeCycle/index.ts +++ b/src/main/lifeCycle/index.ts @@ -223,7 +223,7 @@ class LifeCycle { settingWindow.focus() } const clipboardDir = path.join(picgo.baseDir, CLIPBOARD_IMAGE_FOLDER) - fs.ensureDir(clipboardDir) + fs.emptyDir(clipboardDir) } app.whenReady().then(readyFunction) }