mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
⚡ 改进重命名资源文件性能 Fix https://github.com/siyuan-note/siyuan/issues/7322
This commit is contained in:
parent
929a25a783
commit
6743b21193
2 changed files with 12 additions and 5 deletions
|
|
@ -42,6 +42,12 @@ func LoadTree(boxID, p string, luteEngine *lute.Lute) (ret *parse.Tree, err erro
|
|||
if nil != err {
|
||||
return
|
||||
}
|
||||
|
||||
ret, err = LoadTreeByData(data, boxID, p, luteEngine)
|
||||
return
|
||||
}
|
||||
|
||||
func LoadTreeByData(data []byte, boxID, p string, luteEngine *lute.Lute) (ret *parse.Tree, err error) {
|
||||
ret = parseJSON2Tree(boxID, p, data, luteEngine)
|
||||
if nil == ret {
|
||||
return nil, errors.New("parse tree failed")
|
||||
|
|
@ -88,7 +94,7 @@ func LoadTree(boxID, p string, luteEngine *lute.Lute) (ret *parse.Tree, err erro
|
|||
|
||||
ial := ReadDocIAL(parentData)
|
||||
if 1 > len(ial) {
|
||||
logging.LogWarnf("tree [%s] is corrupted", filePath)
|
||||
logging.LogWarnf("tree [%s] is corrupted", filepath.Join(boxID, p))
|
||||
}
|
||||
title := ial["title"]
|
||||
if "" == title {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue