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: When sorting by filename the extension should only be considered if the basename is equal #984

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Jun 12, 2024

We should not take the file extension into account while sorting, only if the basename is equal.

@susnux susnux added bug Something isn't working 3. to review labels Jun 12, 2024
Copy link

codecov bot commented Jun 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.23%. Comparing base (78fd018) to head (232d60c).
Report is 15 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #984      +/-   ##
==========================================
+ Coverage   80.19%   80.23%   +0.03%     
==========================================
  Files          20       20              
  Lines         515      516       +1     
  Branches      136      136              
==========================================
+ Hits          413      414       +1     
  Misses        100      100              
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

codecov bot commented Jun 12, 2024

Bundle Report

Changes will increase total bundle size by 226 bytes ⬆️

Bundle name Size Change
@nextcloud/files-esm 94.98kB 114 bytes ⬆️
@nextcloud/files-esm-cjs 96.04kB 112 bytes ⬆️

Copy link
Contributor

@kesselb kesselb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Test case for files without extension would be nice.

… if the basename is equal

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux force-pushed the fix/files-sorting-extension branch from 232d60c to eabc2d2 Compare June 14, 2024 11:24
@susnux
Copy link
Contributor Author

susnux commented Jun 14, 2024

Test case for files without extension would be nice.

It is already there (the very first one), but added an additional test case just to be safe.
Also added comments why the tests were added.

@susnux susnux merged commit b3d8079 into main Jun 14, 2024
16 checks passed
@susnux susnux deleted the fix/files-sorting-extension branch June 14, 2024 11:26
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.

Incorrect sorting by names of files with underscore
3 participants