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

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

Closed
kgolinski opened this issue Jun 27, 2014 · 3 comments
Closed

Comments

@kgolinski
Copy link

When setting "sortDirectoriesFirst": true in .brackets.json directories having names starting with numbers don't sort properly in sidebar. The first one lands at the end of directories, the rest after the files. It happens on Mac OS X 10.9.3 and Sprint 41. Also happens without extensions.
sortdirectoriesfirst

@TomMalbran
Copy link
Contributor

This is not an issue with sortDirectoriesFirst but with how we compare the filenames. We use the numeric option equal to true when comparing strings. 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. I checked that switching those to a and b fix this issue.

@dangoor
Copy link
Contributor

dangoor commented Jul 9, 2014

Reviewed low priority in project management area, fix in progress from @TomMalbran (thanks Tom!)

@redmunds
Copy link
Contributor

Confirmed. Closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants