From c0becabcb8f8159f8537de3408c487be620707bd Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Tue, 14 Aug 2018 21:45:53 +0200 Subject: [PATCH] Fix converting of megapark file when path fails to resolve (#7904) This fixes a small regression from #7895. --- src/openrct2/scenario/ScenarioRepository.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/openrct2/scenario/ScenarioRepository.cpp b/src/openrct2/scenario/ScenarioRepository.cpp index 5cb71b384b..7aab25e497 100644 --- a/src/openrct2/scenario/ScenarioRepository.cpp +++ b/src/openrct2/scenario/ScenarioRepository.cpp @@ -486,7 +486,8 @@ private: { auto mpdatPath = _env->GetFilePath(PATHID::MP_DAT); auto scenarioDirectory = _env->GetDirectoryPath(DIRBASE::USER, DIRID::SCENARIO); - auto sc21Path = Path::ResolveCasing(Path::Combine(scenarioDirectory, "sc21.sc4")); + auto expectedSc21Path = Path::Combine(scenarioDirectory, "sc21.sc4"); + auto sc21Path = Path::ResolveCasing(expectedSc21Path); // If the user has a Steam installation. if (!File::Exists(mpdatPath)) @@ -497,7 +498,7 @@ private: if (File::Exists(mpdatPath) && !File::Exists(sc21Path)) { - ConvertMegaPark(mpdatPath, sc21Path); + ConvertMegaPark(mpdatPath, expectedSc21Path); } }