From 8ebaf8bf2dfd899bfc4c31992ff5910eef56d00f Mon Sep 17 00:00:00 2001 From: Qiu Jian Date: Wed, 16 Sep 2020 02:17:34 +0800 Subject: [PATCH] fix: disable qcloud verifyAppId temporarily --- pkg/multicloud/qcloud/qcloud.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/multicloud/qcloud/qcloud.go b/pkg/multicloud/qcloud/qcloud.go index 0bc800143b..2f08600207 100644 --- a/pkg/multicloud/qcloud/qcloud.go +++ b/pkg/multicloud/qcloud/qcloud.go @@ -103,10 +103,10 @@ func NewQcloudClient(cfg *QcloudClientConfig) (*SQcloudClient, error) { if err != nil { return nil, errors.Wrap(err, "fetchRegions") } - err = client.verifyAppId() - if err != nil { - return nil, errors.Wrap(err, "verifyAppId") - } + // err = client.verifyAppId() + // if err != nil { + // return nil, errors.Wrap(err, "verifyAppId") + // } err = client.fetchBuckets() if err != nil { return nil, errors.Wrap(err, "fetchBuckets") @@ -647,7 +647,8 @@ func (client *SQcloudClient) fetchBuckets() error { createAt, _ := timeutils.ParseTimeStr(bInfo.CreationDate) name := bInfo.Name // name = name[:len(name)-len(result.Owner.ID)-1] - name = name[:strings.LastIndexByte(name, '-')] + slashPos := strings.LastIndexByte(name, '-') + name = name[:slashPos] region, err := client.getIRegionByRegionId(bInfo.Region) if err != nil { log.Errorf("fail to find region %s", bInfo.Region)