mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-05 16:28:49 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
0d9b8feeda
1 changed files with 15 additions and 2 deletions
|
|
@ -1119,8 +1119,21 @@ func CreateDailyNote(boxID string) (p string, existed bool, err error) {
|
|||
}
|
||||
IncSync()
|
||||
|
||||
b := treenode.GetBlockTree(id)
|
||||
p = b.Path
|
||||
WaitForWritingFiles()
|
||||
|
||||
tree, err := loadTreeByBlockID(id)
|
||||
if nil != err {
|
||||
logging.LogErrorf("load tree by block id [%s] failed: %v", id, err)
|
||||
return
|
||||
}
|
||||
p = tree.Path
|
||||
date := util.TimeFromID(id)
|
||||
date = date[:len("yyyyMMdd")]
|
||||
tree.Root.SetIALAttr("custom-dailynote-"+date, date)
|
||||
if err = indexWriteJSONQueue(tree); nil != err {
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue