1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-29 21:56:54 +02:00

up should be first

This commit is contained in:
Michael 2023-09-02 19:04:06 +02:00 committed by GitHub
parent 9af73c2212
commit e0460a0dec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,7 +55,11 @@ bool mapSorter::operator()(const std::shared_ptr<ElementInfo> aaa, const std::sh
if(aaa->isFolder != bbb->isFolder) if(aaa->isFolder != bbb->isFolder)
return (aaa->isFolder > bbb->isFolder); return (aaa->isFolder > bbb->isFolder);
else else
{
if(boost::algorithm::starts_with(aaa->folderName, "..") || boost::algorithm::starts_with(bbb->folderName, ".."))
return boost::algorithm::starts_with(aaa->folderName, "..");
return boost::ilexicographical_compare(aaa->folderName, bbb->folderName); return boost::ilexicographical_compare(aaa->folderName, bbb->folderName);
}
} }
auto a = aaa->mapHeader.get(); auto a = aaa->mapHeader.get();