diff --git a/kernel/model/index_fix.go b/kernel/model/index_fix.go index f31fc4327..a01c4feeb 100644 --- a/kernel/model/index_fix.go +++ b/kernel/model/index_fix.go @@ -128,6 +128,12 @@ func resetDuplicateTrees() { duplicatedPaths := map[string]string{} for p, absPath := range paths { name := path.Base(p) + if !ast.IsNodeIDPattern(strings.TrimSuffix(name, ".sy")) { + logging.LogWarnf("invalid .sy file name [%s]", p) + box.moveCorruptedData(absPath) + continue + } + if !names[name] { names[name] = true continue