]> git.proxmox.com Git - pve-common.git/commitdiff
pbs: restore pxar: add required parameters explicitly in method signature
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 17 Nov 2020 08:39:03 +0000 (09:39 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 17 Nov 2020 08:39:03 +0000 (09:39 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/PBSClient.pm

index de492c9fb1118d9a41ddc424207d71a6e3f9e069..1d5d111fc5543ce1c73236b832fb8d53d99f3979 100644 (file)
@@ -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 {