fix(esxi): correctly set the imagePath outside the if block

This commit is contained in:
rainzm
2021-04-14 19:03:48 +08:00
parent 15b08bf340
commit de8fd509d9
+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")
}