From 0abaf5aaae14efafb4610bfc3b35d0bb111089fb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 1 Jul 2008 18:41:30 -0400 Subject: [PATCH] only show one sig fig --- IkiWiki/Plugin/attachment.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index a8e50f833..15c9a8c48 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -227,7 +227,7 @@ sub humansize ($) { #{{{ foreach my $unit (reverse sort { $units{$a} <=> $units{$b} || $b cmp $a } keys %units) { if ($size / $units{$unit} > 0.25) { - return (int($size / $units{$unit} * 100)/100)."$unit"; + return (int($size / $units{$unit} * 10)/10)."$unit"; } } return $size; # near zero, or negative -- 2.39.5