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

Compare full filenames #104528

Merged
merged 1 commit into from
Aug 13, 2020
Merged

Conversation

leilapearson
Copy link
Contributor

This PR fixes issue #99955

When comparing file and folder names, after grouping by type if applicable,
compare the full name all at once instead of separately
comparing the name and the extension.

This change makes filename comparisons work the same as they
do in the Mac File Explorer and the same as a standard locale-based
sort with the numeric option (a form of natural sort) enabled.

Windows File Explorer has a different sort order due to treating the
dot character differently. Many terminal programs and sites like
github also differ, using a unicode-sort instead of a locale-based sort.

CC @isidorn

This change fixes issue microsoft#99955

When comparing file and folder names, after grouping  by type if applicable, compare the full name all at once instead of separately
comparing the name and the extension.

This change makes filename comparisons work the same as they
do in the Mac File Explorer and the same as a standard locale-based
sort with the numeric option (a form of natural sort) enabled.

Windows File Explorer has a different sort order due to treating the
dot character differently. Many terminal programs and sites like
github also differ, using a unicode-sort instead of a locale-based sort.
@isidorn
Copy link
Contributor

isidorn commented Aug 13, 2020

This PR looks great. It is covered by tests - lovely.
I have tried it out and works just fine.
Thus merging in, thank you very much! 👏 ☀️ 🍻

@isidorn isidorn added this to the August 2020 milestone Aug 13, 2020
@isidorn isidorn merged commit 2f1c4b0 into microsoft:master Aug 13, 2020
@leilapearson
Copy link
Contributor Author

Thanks for the quick review and merge @isidorn! 🥇

leilapearson added a commit to relmify/vscode that referenced this pull request Aug 21, 2020
Incorporates change from PR microsoft#104528 to compare full filenames
instead of comparing the name and extension separately
which simplifies the code in comparers.ts.
@github-actions github-actions bot locked and limited conversation to collaborators Sep 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants