allow checking 0-sized resource (ex. IPC$)

patch by Marek Marczykowski <marmarek@staszic.waw.pl>
This commit is contained in:
Elan Ruusamäe 2016-03-03 21:23:49 +02:00
parent e16dc71d5c
commit 487d64a4e4

View file

@ -212,7 +212,8 @@ if (/\s*(\d*) blocks of size (\d*)\. (\d*) blocks available/) {
my ($total_bytes) = $1 * $2;
my ($occupied_bytes) = $1 * $2 - $avail_bytes;
my ($avail) = $avail_bytes/1024;
my ($capper) = int(($3/$1)*100);
my ($capper);
if ($1!=0) { $capper = int(($3/$1)*100) } else { $capper=100 };
my ($mountpt) = "\\\\$host\\$share";
# TODO : why is the kB the standard unit for args ?