[pve-devel] [PATCH v1 pve-common 01/18] pbsclient: rename 'sdir' parameter of constructor to 'secret_dir'

Max Carrara m.carrara at proxmox.com
Fri Aug 2 15:26:39 CEST 2024


.. so that it's less ambiguous for what the parameter stands for at a
glance.

Signed-off-by: Max Carrara <m.carrara at proxmox.com>
---
 src/PVE/PBSClient.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/PBSClient.pm b/src/PVE/PBSClient.pm
index e63af03..a1536e6 100644
--- a/src/PVE/PBSClient.pm
+++ b/src/PVE/PBSClient.pm
@@ -42,12 +42,12 @@ sub get_repository {
 }
 
 sub new {
-    my ($class, $scfg, $storeid, $sdir) = @_;
+    my ($class, $scfg, $storeid, $secret_dir) = @_;
 
     die "no section config provided\n" if ref($scfg) eq '';
     die "undefined store id\n" if !defined($storeid);
 
-    my $secret_dir = $sdir // '/etc/pve/priv/storage';
+    $secret_dir = '/etc/pve/priv/storage' if !defined($secret_dir);
 
     my $self = bless {
 	scfg => $scfg,
-- 
2.39.2





More information about the pve-devel mailing list