mirror of https://github.com/OpenRCT2/OpenRCT2.git
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:
parent
94592f50e6
commit
b9c2fdedd1
|
@ -146,9 +146,10 @@ private:
|
||||||
std::vector<std::string> files;
|
std::vector<std::string> files;
|
||||||
for (const auto& directory : SearchPaths)
|
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);
|
auto scanner = Path::ScanDirectory(pattern, true);
|
||||||
while (scanner->Next())
|
while (scanner->Next())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue