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

This commit is contained in:
Liang Ding 2022-09-05 20:10:54 +08:00
parent 99fdfd7966
commit 5542f25cf0
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -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