From c5f0bcd71c92fc77cc42ffd09f663476939ad9fe Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sat, 20 Aug 2022 10:33:34 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20`file://`=20=E5=8D=8F=E8=AE=AE=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=20Window=20=E5=B9=B3=E5=8F=B0=E4=BD=BF=E7=94=A8=20`/`?= =?UTF-8?q?=20=E4=BD=9C=E4=B8=BA=E7=9B=AE=E5=BD=95=E5=88=86=E5=89=B2?= =?UTF-8?q?=E7=BA=BF=20https://github.com/siyuan-note/siyuan/commit/dcd4e3?= =?UTF-8?q?a3829e8d18cdb0e751c3ea1c3bf2ade40d#r81672670?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/editor/util.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/editor/util.ts b/app/src/editor/util.ts index 70f76f6e9..686a97bde 100644 --- a/app/src/editor/util.ts +++ b/app/src/editor/util.ts @@ -447,9 +447,9 @@ export const openBy = (url: string, type: "folder" | "app") => { }); return; } else { - address = url.replace("file:///", ""); - address = address.replace("file://", ""); - address = address.replace("file://\\", ""); + address = url.replace("file:///", "") + .replace("file://\\", "") + .replace("file://", ""); if ("windows" === window.siyuan.config.system.os) { // `file://` 协议兼容 Window 平台使用 `/` 作为目录分割线 https://github.com/siyuan-note/siyuan/issues/5681 address = address.replace("/", "\\");