mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-19 04:53:12 +01:00
Fix #13445: Make FileScanner::ScanDirectory return a unique_ptr
Also fixes a resource leak in TitleSequence::GetSaves.
This commit is contained in:
@@ -274,7 +274,7 @@ std::string ImageTable::FindLegacyObject(const std::string& name)
|
||||
{
|
||||
// Search recursively for any file with the target name (case insensitive)
|
||||
auto filter = Path::Combine(objectsPath, "*.dat");
|
||||
auto scanner = std::unique_ptr<IFileScanner>(Path::ScanDirectory(filter, true));
|
||||
auto scanner = Path::ScanDirectory(filter, true);
|
||||
while (scanner->Next())
|
||||
{
|
||||
auto currentName = Path::GetFileName(scanner->GetPathRelative());
|
||||
|
||||
Reference in New Issue
Block a user