From 3dcea128b3230a01fc405476b66186b1b1288cc1 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 26 Sep 2022 20:41:24 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/5967 --- app/src/config/bazaar.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/config/bazaar.ts b/app/src/config/bazaar.ts index 9f8d73125..cc1721f3c 100644 --- a/app/src/config/bazaar.ts +++ b/app/src/config/bazaar.ts @@ -337,7 +337,12 @@ export const bazaar = { const type = target.getAttribute("data-type"); if (type === "open") { /// #if !BROWSER - shell.openPath(path.join(window.siyuan.config.system.confDir, "appearance", "themes", target.parentElement.getAttribute("data-name"))); + const dirName = target.parentElement.parentElement.getAttribute("data-bazaar") + if (dirName === "icons" || dirName === "themes") { + shell.openPath(path.join(window.siyuan.config.system.confDir, "appearance", dirName, target.parentElement.getAttribute("data-name"))) + } else { + shell.openPath(path.join(window.siyuan.config.system.dataDir, dirName, target.parentElement.getAttribute("data-name"))); + } /// #endif event.preventDefault(); event.stopPropagation();