filesize
filesize copied to clipboard
Bug: result is incorrect for certain sizes
More specifically, when the size is larger than 1024 MB
but is divisible by 1024
for example, the result would always be 1 GB
.
The code below shows this clearer:
filesize(1073741824); // "1 GB"
filesize(1173741825); // "1.09 GB"
filesize(1297092608); // "1 GB"
I will file a pull request soon if I have time.