mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 Support downloading cloud data snapshots to local on demand https://github.com/siyuan-note/siyuan/issues/8057
This commit is contained in:
parent
171fc40dea
commit
3f6421cf17
3 changed files with 11 additions and 6 deletions
|
|
@ -588,7 +588,14 @@ func DownloadCloudSnapshot(tag, id string) (err error) {
|
|||
}
|
||||
|
||||
defer util.PushClearProgress()
|
||||
downloadFileCount, downloadChunkCount, downloadBytes, err := repo.DownloadTagIndex(tag, id, map[string]interface{}{eventbus.CtxPushMsg: eventbus.CtxPushMsgToStatusBarAndProgress})
|
||||
|
||||
var downloadFileCount, downloadChunkCount int
|
||||
var downloadBytes int64
|
||||
if "" == tag {
|
||||
downloadFileCount, downloadChunkCount, downloadBytes, err = repo.DownloadIndex(id, map[string]interface{}{eventbus.CtxPushMsg: eventbus.CtxPushMsgToStatusBarAndProgress})
|
||||
} else {
|
||||
downloadFileCount, downloadChunkCount, downloadBytes, err = repo.DownloadTagIndex(tag, id, map[string]interface{}{eventbus.CtxPushMsg: eventbus.CtxPushMsgToStatusBarAndProgress})
|
||||
}
|
||||
if nil != err {
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue