my $slist = [];
foreach my $storeid (keys %$ids) {
+ my $storage_enabled = storage_check_enabled($cfg, $storeid, undef, 1);
if (defined($content)) {
my $want_ctype = 0;
last;
}
}
- next if !$want_ctype;
+ next if !$want_ctype || !defined($storage_enabled);
}
my $type = $ids->{$storeid}->{type};
shared => $ids->{$storeid}->{shared} ? 1 : 0,
content => PVE::Storage::Plugin::content_hash_to_string($ids->{$storeid}->{content}),
active => 0,
- enabled => defined(storage_check_enabled($cfg, $storeid, undef, 1)) ? 1 : 0,
+ enabled => defined($storage_enabled) ? 1 : 0,
};
push @$slist, $storeid;
my $cache = {};
foreach my $storeid (keys %$ids) {
- next if !$info->{$storeid}->{enabled};
-
my $scfg = $ids->{$storeid};
+
next if !$info->{$storeid};
+ next if !$info->{$storeid}->{enabled};
eval { activate_storage($cfg, $storeid, $cache); };
if (my $err = $@) {