mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 文档数据文件名不符合 ID 格式时自动移动到 corrupted 文件夹下 Fix https://github.com/siyuan-note/siyuan/issues/7343
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user