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(formatFileSize): Fix default value for binaryPrefixes #770

Merged
merged 1 commit into from Sep 22, 2023

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Sep 21, 2023

The default was previously on Nextcloud core set to true, so bytes were formatted using base 2. (But the wrong unit was used, e.g. 1024 byte were formatted as 1 KB). This reverts the default to format sizes using the binary format (1024 = 1 KiB).

@susnux susnux added bug Something isn't working 3. to review labels Sep 21, 2023
The default was previously on Nextcloud core set to true, so bytes were formatted using base 2.
(But the wrong unit was used, e.g. 1024 byte were formatted as 1 KB).
This reverts the default to format sizes using the binary format (1024 = 1 KiB).

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

Merging #770 (292c784) into master (6d59148) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #770   +/-   ##
=======================================
  Coverage   77.33%   77.33%           
=======================================
  Files          17       17           
  Lines         406      406           
  Branches      109      109           
=======================================
  Hits          314      314           
  Misses         91       91           
  Partials        1        1           
Files Changed Coverage Δ
lib/humanfilesize.ts 100.00% <100.00%> (ø)

@susnux susnux merged commit 99c48b7 into master Sep 22, 2023
10 checks passed
@susnux susnux deleted the fix/default-for-format-size branch September 22, 2023 09:09
@skjnldsv skjnldsv mentioned this pull request Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants