1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Merge pull request #2741 from Laserlicht/folder_order

[fix] folder order
This commit is contained in:
Nordsoft91 2023-09-03 17:56:56 +04:00 committed by GitHub
commit 2057624cbc
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)
return (aaa->isFolder > bbb->isFolder);
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);
}
}
auto a = aaa->mapHeader.get();