mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 重建索引时补全文档树缺失的 updated 字段
This commit is contained in:
@@ -78,6 +78,13 @@ func (box *Box) Index(fullRebuildIndex bool) (treeCount int, treeSize int64) {
|
||||
}
|
||||
|
||||
docIAL := parse.IAL2MapUnEsc(tree.Root.KramdownIAL)
|
||||
if "" == docIAL["updated"] {
|
||||
updated := util.TimeFromID(tree.Root.ID)
|
||||
tree.Root.SetIALAttr("updated", updated)
|
||||
docIAL["updated"] = updated
|
||||
writeJSONQueue(tree)
|
||||
}
|
||||
|
||||
cache.PutDocIAL(p, docIAL)
|
||||
|
||||
util.IncBootProgress(bootProgressPart, fmt.Sprintf(Conf.Language(92), util.ShortPathForBootingDisplay(tree.Path)))
|
||||
|
||||
Reference in New Issue
Block a user