fix: disable qcloud verifyAppId temporarily

This commit is contained in:
Qiu Jian
2020-09-16 02:17:34 +08:00
parent a5ec90abdb
commit 8ebaf8bf2d

View File

@@ -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)