mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-31 13:58:49 +01:00
🎨 清理块树中重复冗余的数据
This commit is contained in:
parent
de79543300
commit
c0240f20d6
4 changed files with 127 additions and 92 deletions
|
|
@ -106,12 +106,10 @@ func autoFixIndex() {
|
|||
|
||||
size := len(paths)
|
||||
|
||||
// 清理块树中重复冗余的数据
|
||||
redundantPaths := treenode.GetRedundantPaths(box.ID, paths)
|
||||
for _, p := range redundantPaths {
|
||||
treenode.RemoveBlockTreesByPath(box.ID, p)
|
||||
}
|
||||
// 清理块树中的冗余数据
|
||||
treenode.ClearRedundantBlockTrees(box.ID, paths)
|
||||
|
||||
// 重新索引缺失的块树
|
||||
missingPaths := treenode.GetNotExistPaths(box.ID, paths)
|
||||
for i, p := range missingPaths {
|
||||
id := path.Base(p)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue