fix(region): obtain ProviderFactory correctly

The provider of the region is not necessarily the same as the resource
This commit is contained in:
rainzm
2020-12-30 12:16:39 +08:00
parent 95464529cb
commit ab3c7d9143
+1 -1
View File
@@ -618,7 +618,7 @@ func (self *SStoragecache) SyncCloudImages(
result := compare.SyncResult{}
driver, err := cloudprovider.GetProviderFactory(region.Provider)
driver, err := self.GetProviderFactory()
if err != nil {
result.Error(errors.Wrapf(err, "GetProviderFactory(%s)", region.Provider))
return result