🎨 超链接地址更好地兼容本地路径 https://github.com/siyuan-note/siyuan/issues/5980

This commit is contained in:
Liang Ding 2022-09-27 15:31:48 +08:00
parent 9a931ee8dc
commit afa0290ca5
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 22 additions and 6 deletions

View file

@ -60,7 +60,10 @@ func InsertLocalAssets(id string, assetPaths []string, isUpload bool) (succMap m
fName += ext
baseName := fName
if gulu.File.IsDir(p) || !isUpload {
succMap[baseName] = "file://" + p
if !strings.HasPrefix(p, "\\\\") {
p = "file://" + p
}
succMap[baseName] = p
continue
}