mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
♻️ Refactor the blocktree storage https://github.com/siyuan-note/siyuan/issues/11773
This commit is contained in:
parent
32413fa11c
commit
7a3d4a05ad
22 changed files with 453 additions and 497 deletions
|
|
@ -88,7 +88,7 @@ func LoadTreeByData(data []byte, boxID, p string, luteEngine *lute.Lute) (ret *p
|
|||
logging.LogErrorf("rebuild parent tree [%s] failed: %s", parentAbsPath, writeErr)
|
||||
} else {
|
||||
logging.LogInfof("rebuilt parent tree [%s]", parentAbsPath)
|
||||
treenode.IndexBlockTree(parentTree)
|
||||
treenode.UpsertBlockTree(parentTree)
|
||||
}
|
||||
} else {
|
||||
logging.LogWarnf("read parent tree data [%s] failed: %s", parentAbsPath, readErr)
|
||||
|
|
@ -137,7 +137,7 @@ func prepareWriteTree(tree *parse.Tree) (data []byte, filePath string, err error
|
|||
newP := treenode.NewParagraph()
|
||||
tree.Root.AppendChild(newP)
|
||||
tree.Root.SetIALAttr("updated", util.TimeFromID(newP.ID))
|
||||
treenode.IndexBlockTree(tree)
|
||||
treenode.UpsertBlockTree(tree)
|
||||
}
|
||||
|
||||
filePath = filepath.Join(util.DataDir, tree.Box, tree.Path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue