This commit is contained in:
Daniel 2024-06-20 22:53:27 +08:00
parent 32413fa11c
commit 7a3d4a05ad
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
22 changed files with 453 additions and 497 deletions

View file

@ -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)