From f8b890f1c0a2b01d910f0488665948a4804bcdc9 Mon Sep 17 00:00:00 2001 From: Fabian Ebner Date: Wed, 20 Jul 2022 12:59:48 +0200 Subject: [PATCH] api: pbs: file restore: don't use namespaced parameters Instead, rely on PBSClient to set namespace according to the initial configuration. Signed-off-by: Fabian Ebner --- PVE/API2/Storage/FileRestore.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/API2/Storage/FileRestore.pm b/PVE/API2/Storage/FileRestore.pm index 5630f52..ccc56e5 100644 --- a/PVE/API2/Storage/FileRestore.pm +++ b/PVE/API2/Storage/FileRestore.pm @@ -119,7 +119,7 @@ __PACKAGE__->register_method ({ my (undef, $snap) = PVE::Storage::parse_volname($cfg, $volid); my $client = PVE::PBSClient->new($scfg, $storeid); - my $ret = $client->file_restore_list([$scfg->{namespace}, $snap], $path, $base64); + my $ret = $client->file_restore_list($snap, $path, $base64); # 'leaf' is a proper JSON boolean, map to perl-y bool # TODO: make PBSClient decode all bools always as 1/0? @@ -188,7 +188,7 @@ __PACKAGE__->register_method ({ $rpcenv->fork_worker('pbs-download', undef, $user, sub { my $name = decode_base64($path); print "Starting download of file: $name\n"; - $client->file_restore_extract($fifo, [$scfg->{namespace}, $snap], $path, 1); + $client->file_restore_extract($fifo, $snap, $path, 1); }); my $ret = {