mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 08:30:42 +02:00
🎨 Update av export
This commit is contained in:
parent
4dd1a97262
commit
82c946ab4d
1 changed files with 6 additions and 1 deletions
|
@ -1358,6 +1358,7 @@ func exportSYZip(boxID, rootDirPath, baseFolderName string, docPaths []string) (
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出数据库 Attribute View export https://github.com/siyuan-note/siyuan/issues/8710
|
// 导出数据库 Attribute View export https://github.com/siyuan-note/siyuan/issues/8710
|
||||||
|
exportStorageAvDir := filepath.Join(exportFolder, "storage", "av")
|
||||||
for _, tree := range trees {
|
for _, tree := range trees {
|
||||||
ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus {
|
ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus {
|
||||||
if !entering {
|
if !entering {
|
||||||
|
@ -1369,10 +1370,14 @@ func exportSYZip(boxID, rootDirPath, baseFolderName string, docPaths []string) (
|
||||||
}
|
}
|
||||||
|
|
||||||
avID := n.AttributeViewID
|
avID := n.AttributeViewID
|
||||||
if avJSONPath := av.GetAttributeViewDataPath(avID); !gulu.File.IsExist(avJSONPath) {
|
avJSONPath := av.GetAttributeViewDataPath(avID)
|
||||||
|
if !gulu.File.IsExist(avJSONPath) {
|
||||||
return ast.WalkContinue
|
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
|
return ast.WalkContinue
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue