mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-29 12:58:48 +01:00
🎨 自动校验索引时排除非 id 格式的 .sy 文件 Fix https://github.com/siyuan-note/siyuan/issues/7111
This commit is contained in:
parent
519f015498
commit
c87bb94a60
2 changed files with 23 additions and 0 deletions
|
|
@ -1244,6 +1244,11 @@ func autoFixIndex() {
|
|||
return
|
||||
}
|
||||
|
||||
if isCheckoutRepo {
|
||||
logging.LogInfof("skip check index caused by checkout repo")
|
||||
return
|
||||
}
|
||||
|
||||
if util.IsMutexLocked(&autoFixLock) {
|
||||
return
|
||||
}
|
||||
|
|
@ -1286,6 +1291,12 @@ func autoFixIndex() {
|
|||
break
|
||||
}
|
||||
|
||||
id := path.Base(p)
|
||||
id = strings.TrimSuffix(id, ".sy")
|
||||
if !ast.IsNodeIDPattern(id) {
|
||||
continue
|
||||
}
|
||||
|
||||
reindexTreeByPath(box.ID, p, i, size)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue