An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: 清理未引用资源时未忽略 `custom-data-assets` 属性定义的资源文件 Fix https://github.com/siyuan-note/siyuan/issues/4122
Liang Ding02b0c553e3cd
diff --git a/kernel/model/assets.go b/kernel/model/assets.goindex 4d20a0eda0..15479fcdab 100644--- a/kernel/model/assets.go+++ b/kernel/model/assets.go@@ -550,7 +550,11 @@ func assetsLinkDestsInTree(tree *parse.Tree) (ret []string) {ret = append(ret, dest)} else {if ast.NodeWidget == n.Type {- dataAssets := n.IALAttr("data-assets")+ dataAssets := n.IALAttr("custom-data-assets")+ if "" == dataAssets {+ // 兼容两种属性名 custom-data-assets 和 data-assets https://github.com/siyuan-note/siyuan/issues/4122#issuecomment-1154796568+ dataAssets = n.IALAttr("data-assets")+ }if "" == dataAssets || !isRelativePath([]byte(dataAssets)) {return ast.WalkContinue}diff --git a/kernel/sql/database.go b/kernel/sql/database.goindex b241b42948..a7b541847a 100644--- a/kernel/sql/database.go+++ b/kernel/sql/database.go@@ -578,7 +578,7 @@ func buildSpanFromNode(n *ast.Node, tree *parse.Tree, rootID, boxID, p string) (var src []bytefor _, attr := range nodes[0].Attr {- if "src" == attr.Key || "data-assets" == attr.Key {+ if "src" == attr.Key || "data-assets" == attr.Key || "custom-data-assets" == attr.Key {src = gulu.Str.ToBytes(attr.Val)break}