This commit is contained in:
Liang Ding 2023-01-09 23:32:01 +08:00
parent 387d63de9b
commit dc02dec341
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 9 additions and 2 deletions

View file

@ -1316,6 +1316,8 @@ func autoFixIndex() {
sql.RemoveTreeQueue(root.Box, rootID)
reindexTree(rootID, i, size)
}
util.PushStatusBar("")
}
func reindexTreeByPath(box, p string, i, size int) {

View file

@ -148,13 +148,18 @@ func GetNotExistPaths(boxID string, paths []string) (ret []string) {
}
tmp := blockTrees
btPathsMap := map[string]bool{}
for _, blockTree := range tmp {
if blockTree.BoxID != boxID {
continue
}
if !pathsMap[blockTree.Path] {
ret = append(ret, blockTree.Path)
btPathsMap[blockTree.Path] = true
}
for p, _ := range pathsMap {
if !btPathsMap[p] {
ret = append(ret, p)
}
}
ret = gulu.Str.RemoveDuplicatedElem(ret)