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) {
case 1: ext = ' B';
break;
case 1: ext = ' KB';
case 1: ext = ' KiB';
break;
case 2: ext = ' MB';
case 2: ext = ' MiB';
break;
case 3: ext = ' GB';
case 3: ext = ' GiB';
break;
case 4: ext = ' TB';
case 4: ext = ' TiB';
break;
case 5: ext = ' PB';
case 5: ext = ' PiB';
break;
case 6: ext = ' EB';
case 6: ext = ' EiB';
break;
case 7: ext = ' ZB';
case 7: ext = ' ZiB';
break;
case 8: ext = ' EB';
case 8: ext = ' EiB';
break;
default: "0.00 MB";
default: "0.00 MiB";
}
return (size.toFixed(2) + ext);
}