🐛 Data sync may cause data loss on Android 14 https://github.com/siyuan-note/siyuan/issues/10205

This commit is contained in:
Daniel 2024-01-21 21:27:50 +08:00
parent dfe8f1317c
commit c00dc1cc5c
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
13 changed files with 36 additions and 33 deletions

View file

@ -27,6 +27,7 @@ import (
"time"
"github.com/88250/gulu"
"github.com/siyuan-note/filelock"
"github.com/siyuan-note/logging"
)
@ -166,7 +167,7 @@ func GetChildDocDepth(treeAbsPath string) (ret int) {
baseDepth := strings.Count(filepath.ToSlash(treeAbsPath), "/")
depth := 1
filepath.Walk(dir, func(path string, info os.FileInfo, err error) error {
filelock.Walk(dir, func(path string, info os.FileInfo, err error) error {
p := filepath.ToSlash(path)
currentDepth := strings.Count(p, "/")
if depth < currentDepth {