--- ugarit.scm +++ ugarit.scm @@ -38,13 +38,15 @@ (sprintf "~AKiB" (inexact->exact (round (/ b 1024))))) (else (sprintf "~AB" b)))) (define (percent a b) - (inexact->exact - (round - (* 100 (/ a b))))) + (if (zero? b) + 100 + (inexact->exact + (round + (* 100 (/ a b)))))) (define progress-callback (let ((cpath #f) (csize #f) (bytes #f)