]> git.proxmox.com Git - qemu-server.git/commitdiff
use new PVE::Storage::abs_filesystem_path()
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 1 Oct 2013 10:41:06 +0000 (12:41 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 1 Oct 2013 10:41:06 +0000 (12:41 +0200)
The check_volume_access() method does no longer return a path.

PVE/API2/Qemu.pm

index d2538563b0dc0e3a7a8b2347b64a469d6fef8e61..a2d033ebfa77a3b3a96f6f3b9d024456a7e63932 100644 (file)
@@ -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);
            }
        }