mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-27 10:46:09 +01:00
⚡ Improve data sync performance for booting https://github.com/siyuan-note/siyuan/issues/13216
This commit is contained in:
parent
eba4dfa0da
commit
89f1887c3b
16 changed files with 153 additions and 113 deletions
|
|
@ -20,6 +20,7 @@ import (
|
|||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
|
|
@ -1461,11 +1462,11 @@ func MoveDocs(fromPaths []string, toBoxID, toPath string, callback interface{})
|
|||
|
||||
func countSubDocs(box, p string) (ret int) {
|
||||
p = strings.TrimSuffix(p, ".sy")
|
||||
_ = filepath.Walk(filepath.Join(util.DataDir, box, p), func(path string, info os.FileInfo, err error) error {
|
||||
_ = filelock.Walk(filepath.Join(util.DataDir, box, p), func(path string, d fs.DirEntry, err error) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if info.IsDir() {
|
||||
if d.IsDir() {
|
||||
return nil
|
||||
}
|
||||
if strings.HasSuffix(path, ".sy") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue