Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix byte conversion #1946

Merged
merged 1 commit into from
Jul 20, 2023
Merged

Fix byte conversion #1946

merged 1 commit into from
Jul 20, 2023

Conversation

rasmuslos
Copy link
Contributor

@rasmuslos rasmuslos commented Jul 19, 2023

Right now ABS converts 206291193b into 196.73MB. This is only partially correct, because the bytes are converted using a factor of 1024. The correct amount would be 206.29MB The are converted to Mebibyte not Megabytes. I got confused by it, because if was wondering why my file size did not match with the one I uploaded. Changing the factor to 1000 fixes this. The unit could also be renamed to MiB but I think this would only confuse most people.

Bildschirmfoto 2023-07-20 um 00 00 38 Bildschirmfoto 2023-07-20 um 00 00 56 Bildschirmfoto 2023-07-20 um 00 02 49 Bildschirmfoto 2023-07-20 um 00 02 11

And yes linux used Mebibyte here, but they do it throughout the entire system. My supposed 5TB Hard drive shows up as a 4.5TB one, because it is only technically 5TB large. Actually it has only 4.5TiB of usable space. But I think this is trivial, as most people probably don't use the linux command line to find out what the size of a file is.

Bildschirmfoto 2023-07-20 um 00 11 06

@advplyr
Copy link
Owner

advplyr commented Jul 20, 2023

I agree. If anything we could setup a tooltip that shows the Mebibyte value but it doesn't make a difference for me.

@advplyr advplyr merged commit 7fdf1a1 into advplyr:master Jul 20, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants