Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Windows 端打开本地文件所在位置失效 Fix https://github.com/siyuan-note/siyuan/issues/5808

Liang Ding5542f25cf0af
diff --git a/app/src/editor/util.ts b/app/src/editor/util.ts
index 843b558499..5c3166c33a 100644
--- a/app/src/editor/util.ts
+++ b/app/src/editor/util.ts
@@ -481,6 +481,10 @@ export const openBy = (url: string, type: "folder" | "app") => {
if (type === "app") {
shell.openPath(address);
} else if (type === "folder") {
+ if ("windows" === window.siyuan.config.system.os) {
+ // Windows 端打开本地文件所在位置失效 https://github.com/siyuan-note/siyuan/issues/5808
+ address = address.replace(/\\\\/g, "\\");
+ }
shell.showItemInFolder(address);
}
/// #endif