改进建立引用索引 https://github.com/siyuan-note/siyuan/issues/7320
This commit is contained in:
Liang Ding 2023-02-10 14:28:10 +08:00
parent 6743b21193
commit b6ea32462e
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
23 changed files with 155 additions and 132 deletions

View file

@ -38,6 +38,7 @@ import (
"github.com/siyuan-note/filelock"
"github.com/siyuan-note/logging"
"github.com/siyuan-note/siyuan/kernel/conf"
"github.com/siyuan-note/siyuan/kernel/filesys"
"github.com/siyuan-note/siyuan/kernel/sql"
"github.com/siyuan-note/siyuan/kernel/task"
"github.com/siyuan-note/siyuan/kernel/treenode"
@ -386,12 +387,13 @@ func (box *Box) renameSubTrees(tree *parse.Tree) {
func (box *Box) moveTrees0(files []*FileInfo) {
totals := len(files) + 5
showProgress := 64 < totals
luteEngine := util.NewLute()
for i, subFile := range files {
if !strings.HasSuffix(subFile.path, ".sy") {
continue
}
subTree, err := LoadTree(box.ID, subFile.path) // LoadTree 会重新构造 HPath
subTree, err := filesys.LoadTree(box.ID, subFile.path, luteEngine) // LoadTree 会重新构造 HPath
if nil != err {
continue
}