mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 12:11:36 +00:00
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:
parent
2aa4553f7a
commit
0b59122007
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user