Signed-off-by: Wolfgang Bumiller <w.bumil...@proxmox.com> --- src/PVE/Storage/Plugin.pm | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm index 98788d1..047b2fc 100644 --- a/src/PVE/Storage/Plugin.pm +++ b/src/PVE/Storage/Plugin.pm @@ -1882,15 +1882,31 @@ sub activate_storage { # check that content dirs are pairwise inequal my $resolved_subdirs = {}; - for my $vtype (sort keys $scfg->{content}->%*) { + my %done; + my $check = sub { + my ($vtype) = @_; + + return if $done{$vtype}; + $done{$vtype} = 1; + my $subdir = $class->get_subdir($scfg, $vtype); my $abs_subdir = abs_path($subdir); - next if !defined($abs_subdir); + return if !defined($abs_subdir); die "storage '$storeid' uses directory $abs_subdir for multiple content types\n" if defined($abs_subdir) && defined($resolved_subdirs->{$abs_subdir}); $resolved_subdirs->{$abs_subdir} = 1; + }; + for my $vtype (sort keys $scfg->{content}->%*) { + if ($vtype eq 'images') { + $check->('vm-vol'); + $check->('ct-vol'); + } elsif ($vtype eq 'rootdir') { + $check->('ct-vol'); + } else { + $check->($vtype); + } } } } -- 2.47.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel