(plugin) os::windows::wsman - mode storages fix illegal division by zero (#4047)

This commit is contained in:
qgarnier 2022-11-09 11:25:43 +01:00 committed by GitHub
parent 780e7b9ce0
commit c6ff5457a5
1 changed files with 2 additions and 0 deletions

View File

@ -142,6 +142,8 @@ sub manage_selection {
next if (defined($self->{option_results}->{filter_type}) && $self->{option_results}->{filter_type} ne '' &&
$type !~ /$self->{option_results}->{filter_type}/);
next if (!defined($_->{Capacity}) || $_->{Capacity} eq '' || $_->{Capacity} == 0);
my ($total, $free) = ($_->{Capacity}, $_->{FreeSpace});
$self->{storages}->{ $_->{Name} } = {
name => $_->{Name},