Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 6f2cbca9 authored by Rob Swindell's avatar Rob Swindell 💬

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

but round-up non-zero values to 1K.
parent 636dbafb
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment