mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🐛 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
|
return ast.WalkContinue
|
||||||
})
|
})
|
||||||
ret = gulu.Str.RemoveDuplicatedElem(ret)
|
ret = gulu.Str.RemoveDuplicatedElem(ret)
|
||||||
|
for i, dest := range ret {
|
||||||
|
// 对于 macOS 的 rtfd 文件夹格式需要特殊处理,为其加上结尾 /
|
||||||
|
if strings.HasSuffix(dest, ".rtfd") {
|
||||||
|
ret[i] = dest + "/"
|
||||||
|
}
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue