fix(string_util): Use binary base for file sizes
This commit is contained in:
parent
d2a6773c26
commit
910baaecb2
@ -178,7 +178,7 @@ namespace string_util {
|
|||||||
vector<string> suffixes{"TB", "GB", "MB"};
|
vector<string> suffixes{"TB", "GB", "MB"};
|
||||||
string suffix{"KB"};
|
string suffix{"KB"};
|
||||||
|
|
||||||
while ((bytes /= 1000) > 999) {
|
while ((bytes /= 1024) >= 1024) {
|
||||||
suffix = suffixes.back();
|
suffix = suffixes.back();
|
||||||
suffixes.pop_back();
|
suffixes.pop_back();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user