From 8110696c308e7ee80a819fc30f87cb748c07fa61 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Mon, 6 Jun 2022 16:14:52 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E4=BC=98=E5=8C=96=E4=BA=91=E7=AB=AF?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=B8=8A=E4=BC=A0=E8=B5=84=E6=BA=90=E5=8D=A0?= =?UTF-8?q?=E7=94=A8=E5=92=8C=E8=80=97=E6=97=B6=20https://github.com/siyua?= =?UTF-8?q?n-note/siyuan/issues/5093?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/osssync.go | 1 - kernel/model/sync.go | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/model/osssync.go b/kernel/model/osssync.go index b5273c5a3..83172ea53 100644 --- a/kernel/model/osssync.go +++ b/kernel/model/osssync.go @@ -236,7 +236,6 @@ func ossDownload(localDirPath, cloudDirPath string, bootOrExit bool) (fetchedFil } if "/"+pathJSON == fetch { // 已经在前面验证解密的步骤中下载过了,目前位于 temp/sync/pathJSON - fetchedFilesCount++ continue } diff --git a/kernel/model/sync.go b/kernel/model/sync.go index c4955e592..e70e1a598 100644 --- a/kernel/model/sync.go +++ b/kernel/model/sync.go @@ -329,6 +329,11 @@ func SyncData(boot, exit, byHand bool) { } fetchedFilesCount, transferSize, downloadedFiles, err := ossDownload(localSyncDirPath, "sync/"+Conf.Sync.CloudName, boot || exit) + + // 加上前面的路径映射文件统计 + fetchedFilesCount += tmpFetchedFiles + transferSize += tmpTransferSize + if nil != err { util.PushClearProgress() msg := fmt.Sprintf(Conf.Language(80), formatErrorMsg(err))