1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Resolve absolute path when indexing files

This ensures scenarios are displayed with their full path in the scenario select window rather than as specified in config or command line.
This commit is contained in:
Ted John
2018-09-08 22:17:21 +01:00
parent 94592f50e6
commit b9c2fdedd1

View File

@@ -146,9 +146,10 @@ private:
std::vector<std::string> files;
for (const auto& directory : SearchPaths)
{
log_verbose("FileIndex:Scanning for %s in '%s'", _pattern.c_str(), directory.c_str());
auto absoluteDirectory = Path::GetAbsolute(directory);
log_verbose("FileIndex:Scanning for %s in '%s'", _pattern.c_str(), absoluteDirectory.c_str());
auto pattern = Path::Combine(directory, _pattern);
auto pattern = Path::Combine(absoluteDirectory, _pattern);
auto scanner = Path::ScanDirectory(pattern, true);
while (scanner->Next())
{