summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-01 18:41:30 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-01 18:41:30 -0400
commit0abaf5aaae14efafb4610bfc3b35d0bb111089fb (patch)
treeb2258e8f9d4ed23fb6bc2026d16402a8dea7bfe7 /IkiWiki/Plugin
parente8a13c32ba090e4428fcc1d25e4f93cd14380326 (diff)
only show one sig fig
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/attachment.pm2
1 files changed, 1 insertions, 1 deletions
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