Permalink
Browse files

sort local saves alphabetically, accounting for uppercase/lowercase

  • Loading branch information...
jacob1 committed Dec 27, 2017
1 parent 887d606 commit 70bbb16f3773226aebaf79cffa5742f461532caa
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/gui/filebrowser/FileBrowserActivity.cpp
@@ -59,7 +59,11 @@ class LoadFilesTask: public Task
virtual bool doWork()
{
std::vector<std::string> files = Client::Ref().DirectorySearch(directory, search, ".cps");
sort(files.rbegin(), files.rend());
std::sort(files.rbegin(), files.rend(), [](std::string a, std::string b) {
std::transform(a.begin(), a.end(), a.begin(), ::tolower);
std::transform(b.begin(), b.end(), b.begin(), ::tolower);
return a < b;
});
notifyProgress(-1);
for(std::vector<std::string>::iterator iter = files.begin(), end = files.end(); iter != end; ++iter)

0 comments on commit 70bbb16

Please sign in to comment.