[Announce] xxv-1.3 - Feature release (1.4 rc)

Message ID 1239738306.3696.74.camel@wopr.deltab.de
State New
Headers

Commit Message

Andreas Brachold April 14, 2009, 7:45 p.m. UTC
  Hello,

Am Dienstag, den 14.04.2009, 20:56 +0200 schrieb Marco Göbenich:
> I saw this behavior too, seems that xxv does not like empty recordings 
> (dirs).


You are right, i fixed that with this patch. 
(apply inside directory lib/XXV/MODULES )
        
        
Andreas
  

Patch

--- RECORDS.pm.bak
+++ RECORDS.pm
@@ -918,7 +918,11 @@ 
     } else {
       $self->{CapacityFree} = int($totalFree * 3600 / 2000); # use 2GB at one hour as base
     }
-    $self->{CapacityPercent}  = ($totalSpace * 100 / ($totalFree + $totalSpace));
+    if(($totalFree + $totalSpace) > 1) {
+      $self->{CapacityPercent}  = ($totalSpace * 100 / ($totalFree + $totalSpace));
+    } else {
+      $self->{CapacityPercent}  = 0;
+    }