-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[stable27] Revert change that made OC.Util.humanFileSize
return decimal sizes instead of binary
#40605
Conversation
4539c7b
to
44ca6bf
Compare
…nstead of base 2 Previously the `OC.Util.humanFileSize` was returning file sizes base 2, meaning 1024 bytes = 1 KiB, but the `@nextcloud/files` library had a regression that set the default to base 10. Meaning 1000 bytes = 1 KB. This is fixed for current `@nextcloud/libraries` but for stable27 we need to fix this manually by wrapping the function. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
44ca6bf
to
b7a939d
Compare
PS: This is just a bugfix so I will not touch the issue that we using binary sizes but showing decimal units. This just restores the previous behavior. |
OC.Util.humanFileSize
return decimal sizes instead of binaryOC.Util.humanFileSize
return decimal sizes instead of binary
drone unrelated |
I think this broke node tests: https://github.com/nextcloud/server/actions/runs/6301358504/job/17107304772
|
@susnux @artonge Do you have any idea if the problem that this PR fixes could possibly also be the cause of nextcloud/android#11974 ? |
No, this PR only touches the web UI |
Summary
Previously the
OC.Util.humanFileSize
was returning file sizes base 2, meaning 1024 bytes = 1 KiB, but the@nextcloud/files
library had a regression that set the default to base 10. Meaning 1000 bytes = 1 KB.This is fixed for current
@nextcloud/libraries
(3.0.0-beta.23) but for stable27 we need to fix this manually by wrapping the function.Checklist