plugin/fsm: sort dirs first

This commit is contained in:
2 * r + 2 * t 2025-09-02 14:38:55 +10:00
parent 2a5a24c51f
commit f8dc3f2b38

View file

@ -173,6 +173,9 @@ void FileSystemModel::updateEntries() {
}
std::sort(m_entries.begin(), m_entries.end(), [](const FileSystemEntry* a, const FileSystemEntry* b) {
if (a->isDir() != b->isDir()) {
return a->isDir();
}
return a->relativePath().localeAwareCompare(b->relativePath()) < 0;
});