restore destroy volumes: remove check for absolute path

Only a result from vdisk_alloc is assigned as a volid and that's never
an absolute path.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fabian Ebner 2022-04-21 13:26:50 +02:00 committed by Thomas Lamprecht
parent 01a4377fc1
commit e60afe8273

View File

@ -6474,11 +6474,7 @@ my $restore_destroy_volumes = sub {
my $volid = $devinfo->{$devname}->{volid};
next if !$volid;
eval {
if ($volid =~ m|^/|) {
unlink $volid || die 'unlink failed\n';
} else {
PVE::Storage::vdisk_free($storecfg, $volid);
}
PVE::Storage::vdisk_free($storecfg, $volid);
print STDERR "temporary volume '$volid' sucessfuly removed\n";
};
print STDERR "unable to cleanup '$volid' - $@" if $@;