diff --git a/kernel/model/assets.go b/kernel/model/assets.go index 85f66aac9..d47ec3194 100644 --- a/kernel/model/assets.go +++ b/kernel/model/assets.go @@ -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 } diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index 5cced0a87..93cc157fb 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -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)