1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-25 07:44:38 +01:00

Use streams for reading parks in S4 importer

This commit is contained in:
Ted John
2017-01-30 22:58:48 +00:00
parent f30a3b315c
commit 2b045ddb9b
5 changed files with 63 additions and 88 deletions

View File

@@ -317,12 +317,18 @@ private:
// RCT1 scenario
bool result = false;
IS4Importer * s4Importer = CreateS4Importer();
s4Importer->LoadScenario(path.c_str());
if (s4Importer->GetDetails(entry))
try
{
s4Importer->LoadScenario(path.c_str());
if (s4Importer->GetDetails(entry))
{
String::Set(entry->path, sizeof(entry->path), path.c_str());
entry->timestamp = timestamp;
result = true;
}
}
catch (Exception)
{
String::Set(entry->path, sizeof(entry->path), path.c_str());
entry->timestamp = timestamp;
result = true;
}
delete s4Importer;
return result;