Merge pull request #6506 from ioito/automated-cherry-pick-of-#6505-upstream-release-3.2

Automated cherry pick of #6505: fix: 上传镜像为转换列表之外时,subformat状态异常
This commit is contained in:
yunion-ci-robot
2020-05-21 23:09:53 +08:00
committed by GitHub
+1 -1
View File
@@ -1005,7 +1005,7 @@ func (self *SImage) MigrateSubImage() error {
if err != nil {
return err
}
if self.GetImageType() != api.ImageTypeISO && imgInst.IsSparse() {
if self.GetImageType() != api.ImageTypeISO && imgInst.IsSparse() && utils.IsInStringArray(self.DiskFormat, options.Options.TargetImageFormats) {
// need to convert again
return self.newSubformat(qemuimg.String2ImageFormat(self.DiskFormat), false)
} else {