Codechange: Use directory_iterator in ScanPath.

Replaces use of custom ttd_opendir.
This commit is contained in:
2024-04-18 00:04:46 +01:00
committed by Peter Nelson
parent d7c547d0db
commit 42523379d9
3 changed files with 27 additions and 39 deletions

View File

@@ -365,9 +365,9 @@ static void FiosGetFileList(SaveLoadOperation fop, bool show_dirs, FiosGetTypeAn
/* Show files */
FiosFileScanner scanner(fop, callback_proc, file_list);
if (subdir == NO_DIRECTORY) {
scanner.Scan(nullptr, *_fios_path, false);
scanner.Scan({}, *_fios_path, false);
} else {
scanner.Scan(nullptr, subdir, true, true);
scanner.Scan({}, subdir, true, true);
}
std::sort(file_list.begin() + sort_start, file_list.end());