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

index f8d6a4f..4077407 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) {
+                       if ($total && $total > $free) {
                                $pc = int(100*($total-$free) / $total);
                                push(@cols,
                                 $pc >= 99 ? "<font color=red>$pc %</font>" :