From be65f6fb8afe71276e209ef13c429c0ab8738a6f Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sun, 29 Oct 2023 09:39:56 +0800 Subject: [PATCH] :art: Improve stability of data sync on some file systems https://github.com/siyuan-note/siyuan/issues/9541 --- sync.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sync.go b/sync.go index 8571f9a..2109010 100644 --- a/sync.go +++ b/sync.go @@ -1129,7 +1129,7 @@ func (repo *Repo) uploadChunks(upsertChunkIDs []string, context map[string]inter func (repo *Repo) localNotFoundChunks(chunkIDs []string) (ret []string, err error) { for _, chunkID := range chunkIDs { if _, getChunkErr := repo.store.Stat(chunkID); nil != getChunkErr { - if isNoSuchFileOrDirErr(err) { + if isNoSuchFileOrDirErr(getChunkErr) { ret = append(ret, chunkID) continue } @@ -1144,7 +1144,7 @@ func (repo *Repo) localNotFoundChunks(chunkIDs []string) (ret []string, err erro func (repo *Repo) localNotFoundFiles(fileIDs []string) (ret []string, err error) { for _, fileID := range fileIDs { if _, getFileErr := repo.store.Stat(fileID); nil != getFileErr { - if isNoSuchFileOrDirErr(err) { + if isNoSuchFileOrDirErr(getFileErr) { ret = append(ret, fileID) continue }