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

This commit is contained in:
rainzm
2021-04-14 18:58:07 +08:00
parent cd68b296e0
commit 1d732e913f
+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")
}