This commit is contained in:
Daniel 2024-06-15 21:41:04 +08:00
parent b590091c9e
commit e99852f067
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -1640,6 +1640,15 @@ func removeDoc(box *Box, p string, luteEngine *lute.Lute) {
}
indexHistoryDir(filepath.Base(historyDir), util.NewLute())
// 刷新文档关联的数据库 https://github.com/siyuan-note/siyuan/issues/11731
allRemoveRootIDs := []string{tree.ID}
allRemoveRootIDs = append(allRemoveRootIDs, removeIDs...)
for _, rootID := range allRemoveRootIDs {
if removeTree, _ := LoadTreeByBlockID(rootID); nil != removeTree {
syncDelete2AttributeView(removeTree.Root)
}
}
if existChildren {
if err = box.Remove(childrenDir); nil != err {
logging.LogErrorf("remove children dir [%s%s] failed: %s", box.ID, childrenDir, err)