From c9928b3d53e92ae7c9b29cab730a63c349816384 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Tue, 1 Oct 2013 12:41:06 +0200 Subject: [PATCH] use new PVE::Storage::abs_filesystem_path() The check_volume_access() method does no longer return a path. --- PVE/API2/Qemu.pm | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index d2538563..a2d033eb 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -127,7 +127,7 @@ my $create_disks = sub { $res->{$ds} = PVE::QemuServer::print_drive($vmid, $disk); } else { - my $path = $rpcenv->check_volume_access($authuser, $storecfg, $vmid, $volid); + $rpcenv->check_volume_access($authuser, $storecfg, $vmid, $volid); my $volid_is_new = 1; @@ -372,13 +372,8 @@ __PACKAGE__->register_method({ die "pipe requires cli environment\n" if $rpcenv->{type} ne 'cli'; } else { - my $path = $rpcenv->check_volume_access($authuser, $storecfg, $vmid, $archive); - - PVE::Storage::activate_volumes($storecfg, [ $archive ]) - if PVE::Storage::parse_volume_id ($archive, 1); - - die "can't find archive file '$archive'\n" if !($path && -f $path); - $archive = $path; + $rpcenv->check_volume_access($authuser, $storecfg, $vmid, $archive); + $archive = PVE::Storage::abs_filesystem_path($storecfg, $archive); } } -- 2.39.5