From e60afe827373820e892e7a04ef08d394394aee6a Mon Sep 17 00:00:00 2001 From: Fabian Ebner Date: Thu, 21 Apr 2022 13:26:50 +0200 Subject: [PATCH] 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 --- PVE/QemuServer.pm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index aa6d2a30..eea06a6a 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -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 $@;