🎨 优化云端同步上传资源占用和耗时 https://github.com/siyuan-note/siyuan/issues/5093

This commit is contained in:
Liang Ding 2022-06-06 16:14:52 +08:00
parent 52f1dc210b
commit 8110696c30
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 5 additions and 1 deletions

View file

@ -236,7 +236,6 @@ func ossDownload(localDirPath, cloudDirPath string, bootOrExit bool) (fetchedFil
}
if "/"+pathJSON == fetch {
// 已经在前面验证解密的步骤中下载过了,目前位于 temp/sync/pathJSON
fetchedFilesCount++
continue
}

View file

@ -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))