mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-24 09:16:09 +01:00
This commit is contained in:
parent
9474f558ad
commit
e8012158ea
2 changed files with 4 additions and 3 deletions
|
|
@ -1231,6 +1231,8 @@ func AutoFixIndex() {
|
|||
var autoFixLock = sync.Mutex{}
|
||||
|
||||
func autoFixIndex() {
|
||||
defer logging.Recover()
|
||||
|
||||
if util.IsMutexLocked(&autoFixLock) || isFullReindexing {
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,15 +117,14 @@ func CeilBlockCount(count int) int {
|
|||
}
|
||||
|
||||
func GetNotExistPaths(boxID string, paths []string) (ret []string) {
|
||||
blockTreesLock.Lock()
|
||||
defer blockTreesLock.Unlock()
|
||||
tmp := blockTrees
|
||||
|
||||
pathsMap := map[string]bool{}
|
||||
for _, path := range paths {
|
||||
pathsMap[path] = true
|
||||
}
|
||||
|
||||
for _, blockTree := range blockTrees {
|
||||
for _, blockTree := range tmp {
|
||||
if blockTree.BoxID != boxID {
|
||||
continue
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue