mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-20 07:16:10 +01:00
🎨 logging
This commit is contained in:
parent
b0377a168b
commit
8fccd3a58e
1 changed files with 6 additions and 4 deletions
|
|
@ -71,13 +71,15 @@ func LoadTree(boxID, p string, luteEngine *lute.Lute) (ret *parse.Tree, err erro
|
|||
}
|
||||
parentPath += ".sy"
|
||||
parentPath = filepath.Join(util.DataDir, boxID, parentPath)
|
||||
data, err := filelock.LockFileRead(parentPath)
|
||||
if nil != err {
|
||||
parentData, readErr := filelock.LockFileRead(parentPath)
|
||||
if nil != readErr {
|
||||
util.LogWarnf("read tree data [%s] failed: %s", parentPath, err)
|
||||
hPathBuilder.WriteString("Untitled/")
|
||||
continue
|
||||
}
|
||||
parentTree, err := protyle.ParseJSONWithoutFix(luteEngine, data)
|
||||
if nil != err {
|
||||
parentTree, parseErr := protyle.ParseJSONWithoutFix(luteEngine, parentData)
|
||||
if nil != parseErr {
|
||||
util.LogWarnf("parse tree [%s] failed: %s", parentPath, err)
|
||||
hPathBuilder.WriteString("Untitled/")
|
||||
continue
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue