🎨 支持多设备操作不同文档后云端同步合并 https://github.com/siyuan-note/siyuan/issues/5092

This commit is contained in:
Liang Ding 2022-06-05 21:37:35 +08:00
parent 8db76a66ff
commit 7f9030d84d
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 64 additions and 8 deletions

View file

@ -246,7 +246,7 @@ func SyncData(boot, exit, byHand bool) {
return
}
wroteFiles, transferSize, err := ossUpload(localSyncDirPath, "sync/"+Conf.Sync.CloudName, device, boot, removeList, upsertList)
wroteFiles, transferSize, err := ossUpload(false, localSyncDirPath, "sync/"+Conf.Sync.CloudName, device, boot, removeList, upsertList)
if nil != err {
util.PushClearProgress()
IncWorkspaceDataVer() // 上传失败的话提升本地版本,以备下次上传
@ -345,7 +345,7 @@ func SyncData(boot, exit, byHand bool) {
return
}
fetchedFilesCount, transferSize, downloadedFiles, err := ossDownload(localSyncDirPath, "sync/"+Conf.Sync.CloudName, boot || exit)
fetchedFilesCount, transferSize, downloadedFiles, err := ossDownload(false, localSyncDirPath, "sync/"+Conf.Sync.CloudName, boot || exit, removeList, upsertList)
if nil != err {
util.PushClearProgress()
msg := fmt.Sprintf(Conf.Language(80), formatErrorMsg(err))