Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Fix #8273: "sortDirectoriesFirst": true in .brackets.json not always working properly #8341

Merged
redmunds merged 1 commit intomasterfrom
tom/fix-dirs-first
Jul 16, 2014
Merged

Fix #8273: "sortDirectoriesFirst": true in .brackets.json not always working properly #8341
redmunds merged 1 commit intomasterfrom
tom/fix-dirs-first

Conversation

@TomMalbran
Copy link
Copy Markdown
Contributor

The issue is that when using locale compare to compare the filenames, we turn the numeric option to on, so that "1" < "2" < "10". This was done so that we get Undefined-1, Undefined-2, Undefined-3, Undefined-10, instead of Undefined-1, Undefined-10, Undefined-2, Undefined-3. But this break the file sorting, since we preppend a 0 to folders and a 1 to files. So later we have that "1XX" < "002", where the first is a file and the second a folder. By changing the prefixes to letters, we can fix this.

This is for #8273.

@redmunds
Copy link
Copy Markdown
Contributor

Triage Complete.

@redmunds
Copy link
Copy Markdown
Contributor

Surprised that this was reported on Mac before Windows. Thanks. Merging.

redmunds added a commit that referenced this pull request Jul 16, 2014
Fix #8273: "sortDirectoriesFirst": true in .brackets.json not always working properly
@redmunds redmunds merged commit 21cf9a9 into master Jul 16, 2014
@redmunds redmunds deleted the tom/fix-dirs-first branch July 16, 2014 14:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants