Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-11-03 11:14:58 +08:00
parent 7e935ee61f
commit f5a1309481
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -1073,12 +1073,13 @@ func CreateWithMarkdown(tags, boxID, hPath, md, parentID, id string, withMath bo
SetBlockAttrs(retID, nameValues)
FlushTxQueue()
docPath, _, err := GetPathByID(retID)
if err != nil {
logging.LogWarnf("get path by id [%s] failed: %s", retID, err)
bt := treenode.GetBlockTree(retID)
if nil == bt {
logging.LogWarnf("get block tree by id [%s] failed after create", retID)
return
}
box.addMinSort(path.Dir(docPath), retID)
box.addMinSort(path.Dir(bt.Path), retID)
return
}