From 8b88b2f6e5d945be450f19b517bde13deed7b69d Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 17 Nov 2020 09:39:03 +0100 Subject: [PATCH] pbs: restore pxar: add required parameters explicitly in method signature Signed-off-by: Thomas Lamprecht --- src/PVE/PBSClient.pm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/PVE/PBSClient.pm b/src/PVE/PBSClient.pm index de492c9..1d5d111 100644 --- a/src/PVE/PBSClient.pm +++ b/src/PVE/PBSClient.pm @@ -234,13 +234,10 @@ sub backup_tree { }; sub restore_pxar { - my ($self, $opts) = @_; + my ($self, $snapshot, $pxarname, $target, $cmd_opts) = @_; - my $snapshot = delete $opts->{snapshot}; die "snapshot not provided\n" if !defined($snapshot); - my $pxarname = delete $opts->{pxarname}; die "archive name not provided\n" if !defined($pxarname); - my $target = delete $opts->{target}; die "restore-target not provided\n" if !defined($target); my $param = [ @@ -249,8 +246,9 @@ sub restore_pxar { "$target", "--allow-existing-dirs", 0, ]; + $cmd_opts //= {}; - return $self->run_raw_client_cmd('restore', $param, %$opts); + return $self->run_raw_client_cmd('restore', $param, %$cmd_opts); }; sub forget_snapshot { -- 2.39.2