Sanity check disk space
authorJamie Cameron <jcameron@webmin.com>
Fri, 13 Mar 2009 18:54:44 +0000 (18:54 +0000)
committerJamie Cameron <jcameron@webmin.com>
Fri, 13 Mar 2009 18:54:44 +0000 (18:54 +0000)
mount/index.cgi

index 4077407..b4af9bf 100755 (executable)
@@ -84,7 +84,7 @@ if (@visible) {
                if ($config{'show_used'}) {
                        # Add disk space used column
                        ($total, $free) = &disk_space($minfo[2],$minfo[0]);
-                       if ($total && $total > $free) {
+                       if ($total > 0 && $total >= $free) {
                                $pc = int(100*($total-$free) / $total);
                                push(@cols,
                                 $pc >= 99 ? "<font color=red>$pc %</font>" :