Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2023-12-19 23:19:02 +08:00
commit bab8aaf73f
2 changed files with 5 additions and 2 deletions

View File

@ -111,6 +111,11 @@ func NetImg2LocalAssets(rootID, originalURL string) (err error) {
// `网络图片转换为本地图片` 支持处理 `file://` 本地路径图片 https://github.com/siyuan-note/siyuan/issues/6546
u := string(dest)[7:]
unescaped, _ := url.PathUnescape(u)
if unescaped != u {
// `Convert network images to local` supports URL-encoded local file names https://github.com/siyuan-note/siyuan/issues/9929
u = unescaped
}
if !gulu.File.IsExist(u) || gulu.File.IsDir(u) {
return ast.WalkSkipChildren
}

View File

@ -1694,8 +1694,6 @@ func replaceAttributeViewBlock(operation *Operation, tx *Transaction) (err error
return
}
WaitForWritingFiles()
var node *ast.Node
if !operation.IsDetached {
node, _, _ = getNodeByBlockID(tx, operation.NextID)