mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🐛 删除父文档时子文档排序配置未清理干净 Fix https://github.com/siyuan-note/siyuan/issues/6469
This commit is contained in:
parent
0e651b097f
commit
43ae47a902
2 changed files with 13 additions and 35 deletions
|
|
@ -208,14 +208,14 @@ func GetChildDocIDs(parentDocDirAbsPath string) (ret []string) {
|
|||
return
|
||||
}
|
||||
|
||||
filepath.Walk(parentDocDirAbsPath, func(path string, info os.FileInfo, err error) error {
|
||||
filepath.Walk(parentDocDirAbsPath, func(p string, info os.FileInfo, err error) error {
|
||||
if info.IsDir() {
|
||||
return nil
|
||||
}
|
||||
if !strings.HasSuffix(path, ".sy") {
|
||||
if !strings.HasSuffix(p, ".sy") {
|
||||
return nil
|
||||
}
|
||||
id := path[len(parentDocDirAbsPath)+1 : len(path)-3]
|
||||
id := strings.TrimSuffix(filepath.Base(p), ".sy")
|
||||
ret = append(ret, id)
|
||||
return nil
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue