projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8a13c3
)
only show one sig fig
author
Joey Hess
<joey@kodama.kitenet.net>
Tue, 1 Jul 2008 22:41:30 +0000
(18:41 -0400)
committer
Joey Hess
<joey@kodama.kitenet.net>
Tue, 1 Jul 2008 22:41:30 +0000
(18:41 -0400)
IkiWiki/Plugin/attachment.pm
patch
|
blob
|
history
diff --git
a/IkiWiki/Plugin/attachment.pm
b/IkiWiki/Plugin/attachment.pm
index a8e50f833b4121d918cb3c5296a5d442a71f3a57..15c9a8c483a44f92e34f6952ef59d0ebd922fa4b 100644
(file)
--- 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} * 10
0)/10
0)."$unit";
+ return (int($size / $units{$unit} * 10
)/1
0)."$unit";
}
}
return $size; # near zero, or negative