🎨 导入 .sy.zip 时增量建立索引 https://github.com/siyuan-note/siyuan/issues/7123

This commit is contained in:
Liang Ding 2023-01-19 17:13:27 +08:00
parent 7401ae845a
commit 772984fe1b
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
4 changed files with 51 additions and 6 deletions

View file

@ -103,8 +103,11 @@ func pagedPaths(localPath string, pageSize int) (ret map[int][]string) {
ret = map[int][]string{}
page := 1
filepath.Walk(localPath, func(path string, info fs.FileInfo, err error) error {
if info.IsDir() && strings.HasPrefix(info.Name(), ".") {
return filepath.SkipDir
if info.IsDir() {
if strings.HasPrefix(info.Name(), ".") {
return filepath.SkipDir
}
return nil
}
if !strings.HasSuffix(info.Name(), ".sy") {