🐛 Incorrect rtfd file handling when Insert image or file
on macOS https://github.com/siyuan-note/siyuan/issues/9585
This commit is contained in:
parent
82373ff3e9
commit
af93409a17
1 changed files with 6 additions and 0 deletions
|
@ -907,6 +907,12 @@ func assetsLinkDestsInTree(tree *parse.Tree) (ret []string) {
|
|||
return ast.WalkContinue
|
||||
})
|
||||
ret = gulu.Str.RemoveDuplicatedElem(ret)
|
||||
for i, dest := range ret {
|
||||
// 对于 macOS 的 rtfd 文件夹格式需要特殊处理,为其加上结尾 /
|
||||
if strings.HasSuffix(dest, ".rtfd") {
|
||||
ret[i] = dest + "/"
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue