mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 10:30:13 +01:00
🎨 file:// 协议兼容 Window 平台使用 / 作为目录分割线 Fix https://github.com/siyuan-note/siyuan/issues/5681
This commit is contained in:
parent
c2eb84ad16
commit
dcd4e3a382
1 changed files with 8 additions and 6 deletions
|
|
@ -18,11 +18,7 @@ import {shell} from "electron";
|
|||
import {pushBack} from "../util/backForward";
|
||||
import {Asset} from "../asset";
|
||||
import {Layout} from "../layout";
|
||||
import {
|
||||
hasClosestBlock,
|
||||
hasClosestByAttribute,
|
||||
hasClosestByClassName,
|
||||
} from "../protyle/util/hasClosest";
|
||||
import {hasClosestBlock, hasClosestByAttribute, hasClosestByClassName,} from "../protyle/util/hasClosest";
|
||||
import {getPreviousHeading} from "../protyle/wysiwyg/getBlock";
|
||||
import {lockFile, setTitle} from "../dialog/processSystem";
|
||||
import {zoomOut} from "../menus/protyle";
|
||||
|
|
@ -451,7 +447,13 @@ export const openBy = (url: string, type: "folder" | "app") => {
|
|||
});
|
||||
return;
|
||||
} else {
|
||||
address = url.replace("file://", "");
|
||||
address = url.replace("file:///", "");
|
||||
address = address.replace("file://", "");
|
||||
address = address.replace("file://\\", "");
|
||||
if ("windows" === window.siyuan.config.system.os) {
|
||||
// `file://` 协议兼容 Window 平台使用 `/` 作为目录分割线 https://github.com/siyuan-note/siyuan/issues/5681
|
||||
address = address.replace("/", "\\");
|
||||
}
|
||||
}
|
||||
|
||||
if (type === "app") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue