Author: Jogy
Date: 2006-05-19 15:02:54 +0000 (Fri, 19 May 2006)
New Revision: 8788
Modified:
trunk/freenet/src/freenet/support/SizeUtil.java
Log:
btw - isn't that supposed to be 1024 !?
Modified: trunk/freenet/src/freenet/support/SizeUtil.java
===================================================================
--- trunk/freenet/src/freenet/support/SizeUtil.java 2006-05-19 14:37:22 UTC
(rev 8787)
+++ trunk/freenet/src/freenet/support/SizeUtil.java 2006-05-19 15:02:54 UTC
(rev 8788)
@@ -12,15 +12,15 @@
long s = 1;
int i;
for(i=0;i<suffixes.length;i++) {
- s *= 1000;
+ s *= 1024;
if(s > sz) {
break;
// Smaller than multiplier [i] - use the
previous one
}
}
- s /= 1000; // we use the previous unit
- if (s == 1) // Bytes?
+ s /= 1024; // we use the previous unit
+ if (s == 1) // Bytes? Then we don't need real numbers with a
comma
{
return sz + " " + suffixes[0];
}