-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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: Use correct unit for file sizes and fix user quota #40621
Conversation
0ba7a5a
to
7c4b489
Compare
fdb40e5
to
b145032
Compare
We always used binary file sizes (base 2, meaning 2048 bytes = 2KiB), but we added the wrong unit (we used the decimal (base 10) unit e.g. 2KB). This fixes the user management showing a wrong quota. Also the OC_Helper now supports base 10 and base 2 in `computerFileSize`, for backwards compatibility it defaults to force even units like `KB` to be binary. Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
b145032
to
aad8513
Compare
cc @sorbaugh and @AndyScherzinger The problem:
But for current master the frontend is still broken, we have to options:
From my point of view only 1 and 3 are really considerable solutions.
Pro 3 (this PR):
|
While it's true that lots of users are conditioned to read KB, GB, etc, I think switching to the correct units would be a "soft enough" change UX wise so I would vote for option 3 (but would be fine with option 1). |
I’d say it’s best in this case to go with what Windows does since @susnux as you say that is what the majority of people are used to. Yes it is not correct, but it is sort of convention on a topic where many people are confused anyway. |
I don't have a strong opinion on this, so option 1 is fine as well if we can foresee that option 3 would be confusing to people. |
It was decided to keep current style. |
Summary
We always used binary file sizes (base 2, meaning 2048 bytes = 2KiB), but we added the wrong unit (we used the decimal (base 10) unit e.g. 2KB).
This fixes the user management showing a wrong quota (#38874 for master)
Also the OC_Helper now supports base 10 and base 2 in
computerFileSize
, for backwards compatibility it defaults to force even units likeKB
to be binary.Screenshots
Checklist