Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2023-01-10 00:22:46 +08:00
commit c50400428b
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)