Fedora31 - fix Size() for vhd

Refs: #442
This commit is contained in:
Jiri Kortus 2020-04-23 17:26:12 +02:00 committed by Ondřej Budai
parent 3dbfdc4ee6
commit c4d40b4b0f

View file

@ -136,7 +136,7 @@ func (t *imageType) MIMEType() string {
func (t *imageType) Size(size uint64) uint64 {
const MegaByte = 1024 * 1024
// Microsoft Azure requires vhd images to be rounded up to the nearest MB
if t.filename == "vhd" && size%MegaByte != 0 {
if t.name == "vhd" && size%MegaByte != 0 {
size = (size/MegaByte + 1) * MegaByte
}
if size == 0 {