From 5542f25cf0af05b128c083f1cbaaedff725f8a5a Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Mon, 5 Sep 2022 20:10:54 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20Windows=20=E7=AB=AF=E6=89=93=E5=BC=80?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E6=96=87=E4=BB=B6=E6=89=80=E5=9C=A8=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E5=A4=B1=E6=95=88=20Fix=20https://github.com/siyuan-n?= =?UTF-8?q?ote/siyuan/issues/5808?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/editor/util.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/editor/util.ts b/app/src/editor/util.ts index 843b55849..5c3166c33 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