]> git.proxmox.com Git - qemu-server.git/commitdiff
restore destroy volumes: remove check for absolute path
authorFabian Ebner <f.ebner@proxmox.com>
Thu, 21 Apr 2022 11:26:50 +0000 (13:26 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 25 Apr 2022 16:19:17 +0000 (18:19 +0200)
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>
PVE/QemuServer.pm

index aa6d2a306c24f8ef0672ac784a0e37e887131fab..eea06a6a719aa061cee9bfe8b842254792bdc5e7 100644 (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 $@;