diff --git a/src/main/services/FileStorage.ts b/src/main/services/FileStorage.ts index 7d726c687..e70544019 100644 --- a/src/main/services/FileStorage.ts +++ b/src/main/services/FileStorage.ts @@ -216,6 +216,9 @@ class FileStorage { } public deleteDir = async (_: Electron.IpcMainInvokeEvent, id: string): Promise => { + if (!fs.existsSync(path.join(this.storageDir, id))) { + return + } await fs.promises.rm(path.join(this.storageDir, id), { recursive: true }) }