mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
🎨 优化云端同步上传资源占用和耗时 https://github.com/siyuan-note/siyuan/issues/5093
This commit is contained in:
parent
52f1dc210b
commit
8110696c30
2 changed files with 5 additions and 1 deletions
|
|
@ -236,7 +236,6 @@ func ossDownload(localDirPath, cloudDirPath string, bootOrExit bool) (fetchedFil
|
|||
}
|
||||
if "/"+pathJSON == fetch {
|
||||
// 已经在前面验证解密的步骤中下载过了,目前位于 temp/sync/pathJSON
|
||||
fetchedFilesCount++
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue