Merge pull request #10729 from rainzm/esxi/imagePath

fix(esxi): correctly set the imagePath outside the if block
This commit is contained in:
Zexi Li
2021-04-15 12:40:57 +08:00
committed by GitHub
+2 -1
View File
@@ -814,7 +814,8 @@ func (self *SHost) addDisks(ctx context.Context, dc *SDatacenter, ds *SDatastore
size = 30 * 1024
}
} else {
imagePath, err := self.FileUrlPathToDsPath(imagePath)
var err error
imagePath, err = self.FileUrlPathToDsPath(imagePath)
if err != nil {
return nil, errors.Wrapf(err, "SHost.FileUrlPathToDsPath")
}