mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
worlds list is sorted now
This commit is contained in:
parent
86412a28ec
commit
6ae59cd851
1 changed files with 5 additions and 0 deletions
|
|
@ -65,6 +65,11 @@ std::vector<fs::path> EnginePaths::scanForWorlds() {
|
|||
}
|
||||
folders.push_back(worldFolder);
|
||||
}
|
||||
std::sort(folders.begin(), folders.end(), [](fs::path a, fs::path b) {
|
||||
a = a/fs::u8path(WorldFiles::WORLD_FILE);
|
||||
b = b/fs::u8path(WorldFiles::WORLD_FILE);
|
||||
return fs::last_write_time(a) > fs::last_write_time(b);
|
||||
});
|
||||
return folders;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue