`$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`. 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; } } } -- 2.47.3 _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
