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:
@@ -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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user