Skip to content
Snippets Groups Projects
Commit 6f2cbca9 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Revert back to whole numbers only for the comma-formatted K output

but round-up non-zero values to 1K.
parent 636dbafb
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -16,7 +16,7 @@ function file_size_str(size, bytes, precision)
return "0K";
size = size/1024;
if(size<1000) /* KB */
return format("%1.2fK",size);
return format("%ldK", Math.ceil(size));
if(size<100000) /* KB With comma */
return format("%ld,%03ldK",(size/1000),(size%1000));
size = size/1024;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment