Am 05.12.25 um 4:44 PM schrieb Max R. Carrara: > `$subdir` is a subdirectory of `$path`, so the variables are never > equal. Even if they were equal for some reason, calling `mkpath` here > wouldn't fail or be otherwise dangerous. > > Note that even if the user happened to configure an empty path for a > given content subdirectory, `get_subdir` would still return "$path/", > which is obviously not equal to `$path`.
Note that a third-party plugin might return the very same value, so the commit message is inaccurate. I do agree the check can be removed. > > Therefore, remove this check. > > Signed-off-by: Max R. Carrara <[email protected]> > --- > src/PVE/Storage/Plugin.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm > index 65f2551..617b0f8 100644 > --- a/src/PVE/Storage/Plugin.pm > +++ b/src/PVE/Storage/Plugin.pm > @@ -1919,7 +1919,7 @@ sub activate_storage { > || ($vtype eq 'backup' && > defined($scfg->{content}->{'rootdir'})) > ) { > my $subdir = $class->get_subdir($scfg, $vtype); > - mkpath $subdir if $subdir ne $path; > + mkpath $subdir; > } > } > } _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
