diff --git a/kernel/model/export.go b/kernel/model/export.go index d7c647404..f10addfff 100644 --- a/kernel/model/export.go +++ b/kernel/model/export.go @@ -1358,6 +1358,7 @@ func exportSYZip(boxID, rootDirPath, baseFolderName string, docPaths []string) ( } // 导出数据库 Attribute View export https://github.com/siyuan-note/siyuan/issues/8710 + exportStorageAvDir := filepath.Join(exportFolder, "storage", "av") for _, tree := range trees { ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus { if !entering { @@ -1369,10 +1370,14 @@ func exportSYZip(boxID, rootDirPath, baseFolderName string, docPaths []string) ( } avID := n.AttributeViewID - if avJSONPath := av.GetAttributeViewDataPath(avID); !gulu.File.IsExist(avJSONPath) { + avJSONPath := av.GetAttributeViewDataPath(avID) + if !gulu.File.IsExist(avJSONPath) { return ast.WalkContinue } + if copyErr := filelock.Copy(avJSONPath, filepath.Join(exportStorageAvDir, avID+".json")); nil != copyErr { + logging.LogErrorf("copy av json failed: %s", copyErr) + } return ast.WalkContinue })