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);
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;