|
@@ -3285,7 +3285,7 @@ static int _humanize_digits(int p_num) {
|
|
String String::humanize_size(size_t p_size) {
|
|
String String::humanize_size(size_t p_size) {
|
|
|
|
|
|
uint64_t _div = 1;
|
|
uint64_t _div = 1;
|
|
- static const char *prefix[] = { " Bytes", " KB", " MB", " GB", " TB", " PB", " EB", "" };
|
|
|
|
|
|
+ static const char *prefix[] = { " B", " KiB", " MiB", " GiB", " TiB", " PiB", " EiB", "" };
|
|
int prefix_idx = 0;
|
|
int prefix_idx = 0;
|
|
|
|
|
|
while (p_size > (_div * 1024) && prefix[prefix_idx][0]) {
|
|
while (p_size > (_div * 1024) && prefix[prefix_idx][0]) {
|
|
@@ -3296,7 +3296,7 @@ String String::humanize_size(size_t p_size) {
|
|
int digits = prefix_idx > 0 ? _humanize_digits(p_size / _div) : 0;
|
|
int digits = prefix_idx > 0 ? _humanize_digits(p_size / _div) : 0;
|
|
double divisor = prefix_idx > 0 ? _div : 1;
|
|
double divisor = prefix_idx > 0 ? _div : 1;
|
|
|
|
|
|
- return String::num(p_size / divisor).pad_decimals(digits) + prefix[prefix_idx];
|
|
|
|
|
|
+ return String::num(p_size / divisor).pad_decimals(digits) + RTR(prefix[prefix_idx]);
|
|
}
|
|
}
|
|
bool String::is_abs_path() const {
|
|
bool String::is_abs_path() const {
|
|
|
|
|