🐛 删除父文档时子文档排序配置未清理干净 Fix https://github.com/siyuan-note/siyuan/issues/6469

This commit is contained in:
Liang Ding 2022-11-03 20:10:42 +08:00
parent 0e651b097f
commit 43ae47a902
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 13 additions and 35 deletions

View file

@ -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
})