]> git.proxmox.com Git - qemu-server.git/commitdiff
followup: make ISO exists check a bit stricter
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 30 Apr 2019 13:07:55 +0000 (13:07 +0000)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 30 Apr 2019 13:07:55 +0000 (13:07 +0000)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/QemuServer/Cloudinit.pm

index bda48f1e2a250e547a8452a818f87d6676f3f147..981e6afd2fd563e7ddfd17cac2407cde19cafd7b 100644 (file)
@@ -33,7 +33,7 @@ sub commit_cloudinit_disk {
     my $format = PVE::QemuServer::qemu_img_format($scfg, $volname);
 
     my $size = eval { PVE::Storage::file_size_info($iso_path) };
-    if (!$size) {
+    if ($size <= 0) {
        $volname =~ m/(vm-$vmid-cloudinit(.(qcow2|raw))?)/;
        my $name = $1;
        my $d = PVE::Storage::vdisk_alloc($storecfg, $storeid, $vmid, $format, $name, 4 * 1024);