]> git.proxmox.com Git - pve-storage.git/commitdiff
vmid is integer an can be 0, so we need to use defined() to check if it is set
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 14 Feb 2013 07:41:15 +0000 (08:41 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 14 Feb 2013 07:41:15 +0000 (08:41 +0100)
Note: The plan is to use vmid 0 to mark shared volumes.

PVE/Storage.pm

index c2f83a0a9ef61cb8a083311ddab97efb1d4498cd..99aa1f0c24ceada2943cb9a047af2063a606f5b6 100755 (executable)
@@ -536,7 +536,7 @@ sub vdisk_free {
                        $plugin->parse_volname($tmpvolname);
                };
 
-               if ($basename && $basevmid && $basevmid == $vmid && $basename eq $name) {
+               if ($basename && defined($basevmid) && $basevmid == $vmid && $basename eq $name) {
                    die "base volume '$volname' is still in use " .
                        "(use by '$tmpvolname')\n";
                }