applied with a small followup:
>
> +sub config_aware_base_mkdir {
> + my ($class, $scfg, $path) = @_;
> +
> + # FIXME the mkdir parameter is deprecated and create-base-path should be
> used
> + my $mkpath = 0;
> + if (!defined($scfg->{'create-base-path'}) && !defined($scfg->{mkdir})) {
> + $mkpath = 1;
> + } elsif (defined($scfg->{'create-base-path'}) &&
> $scfg->{'create-base-path'}) {
> + $mkpath = 1;
> + } elsif ($scfg->{mkdir}) {
> + $mkpath = 1;
> + }
> + mkpath $path if $mkpath;
> +}
> +
> 1;
> --
> 2.30.2
I turned this logic into:
$mkpath = $scfg->{'create-base-path'} // $scfg->{'mkdir'} // 1;
So the new option takes precedence and is honored if set to 0 (since the
above condition is `defined() && true => true`, but defined+false should
take precedence.
_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel