This commit is contained in:
parent
387d63de9b
commit
dc02dec341
2 changed files with 9 additions and 2 deletions
|
@ -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) {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue