Skip to content

Commit

Permalink
♻️ Rename func
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jun 26, 2023
1 parent 87fe3f5 commit fb7d365
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ func (repo *Repo) sync0(context map[string]interface{},
trafficStat.APIPut++

// 更新云端索引列表
downloadBytes, uploadBytes, err := repo.updateCloudIndex(latest, context)
downloadBytes, uploadBytes, err := repo.updateCloudIndexesV2(latest, context)
if nil != err {
logging.LogErrorf("update cloud indexes failed: %s", err)
return
Expand Down Expand Up @@ -682,7 +682,7 @@ func (repo *Repo) updateCloudRef(ref string, context map[string]interface{}) (up
return
}

func (repo *Repo) updateCloudIndex(latest *entity.Index, context map[string]interface{}) (downloadBytes, uploadBytes int64, err error) {
func (repo *Repo) updateCloudIndexesV2(latest *entity.Index, context map[string]interface{}) (downloadBytes, uploadBytes int64, err error) {
data, err := repo.cloud.DownloadObject("indexes-v2.json")
if nil != err {
if !errors.Is(err, cloud.ErrCloudObjectNotFound) {
Expand Down
2 changes: 1 addition & 1 deletion sync_manual.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ func (repo *Repo) SyncUpload(context map[string]interface{}) (trafficStat *Traff
trafficStat.APIPut++

// 更新云端索引列表
downloadBytes, uploadBytes, err := repo.updateCloudIndex(latest, context)
downloadBytes, uploadBytes, err := repo.updateCloudIndexesV2(latest, context)
if nil != err {
logging.LogErrorf("update cloud indexes failed: %s", err)
return
Expand Down

0 comments on commit fb7d365

Please sign in to comment.