From c4ffc880e4a9ec8314de41c63a553ba7e3c6f438 Mon Sep 17 00:00:00 2001 From: Elysia Date: Sat, 14 Feb 2026 19:06:58 +0800 Subject: [PATCH] chore(main): clean up temp dir on quit --- electron/main/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/electron/main/index.ts b/electron/main/index.ts index 631fa40c..ce236ff0 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -155,6 +155,13 @@ app.on("activate", () => { } }); +app.on("will-quit", () => { + // Clean up temp dir + logger.info("Cleaning up temp dir"); + fs.rmSync("/tmp/apm-store/", { recursive: true, force: true }); + logger.info("Done, exiting") +}); + // 设置托盘 // 获取图标路径 function getIconPath() {