From: Stoiko Ivanov Date: Thu, 18 Mar 2021 15:14:47 +0000 (+0100) Subject: acme: recursively create account directory X-Git-Url: https://git.proxmox.com/?p=pmg-api.git;a=commitdiff_plain;h=5d30f58689282b84b9df177b1c295fbb4aac9656 acme: recursively create account directory to account for the new layout Signed-off-by: Stoiko Ivanov --- diff --git a/src/PMG/API2/ACME.pm b/src/PMG/API2/ACME.pm index 1b35511..7aee17a 100644 --- a/src/PMG/API2/ACME.pm +++ b/src/PMG/API2/ACME.pm @@ -3,6 +3,8 @@ package PMG::API2::ACME; use strict; use warnings; +use File::Path; + use PVE::Exception qw(raise_param_exc); use PVE::JSONSchema qw(get_standard_option); use PVE::Tools qw(extract_param); @@ -142,7 +144,7 @@ __PACKAGE__->register_method ({ my $authuser = $rpcenv->get_user(); my ($account_name, $account_file) = extract_account_name($param); - mkdir $acme_account_dir if ! -e $acme_account_dir; + File::Path::make_path($acme_account_dir) if ! -e $acme_account_dir; raise_param_exc({'name' => "ACME account config file '${account_name}' already exists."}) if -e $account_file;