fix size units

We have been using 10^3 based unit names to refer to 2^10 based units. This is misleading and should be fixed.
This commit is contained in:
Drew Nutter 2016-10-12 19:33:36 -04:00 committed by GitHub
parent 2aa4553f7a
commit 0b59122007

View File

@ -92,23 +92,23 @@ function get_size(size) {
switch (steps) { switch (steps) {
case 1: ext = ' B'; case 1: ext = ' B';
break; break;
case 1: ext = ' KB'; case 1: ext = ' KiB';
break; break;
case 2: ext = ' MB'; case 2: ext = ' MiB';
break; break;
case 3: ext = ' GB'; case 3: ext = ' GiB';
break; break;
case 4: ext = ' TB'; case 4: ext = ' TiB';
break; break;
case 5: ext = ' PB'; case 5: ext = ' PiB';
break; break;
case 6: ext = ' EB'; case 6: ext = ' EiB';
break; break;
case 7: ext = ' ZB'; case 7: ext = ' ZiB';
break; break;
case 8: ext = ' EB'; case 8: ext = ' EiB';
break; break;
default: "0.00 MB"; default: "0.00 MiB";
} }
return (size.toFixed(2) + ext); return (size.toFixed(2) + ext);
} }