mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 21:43:06 +01:00
Fix normalisation writing files to unknown location
This commit is contained in:
@@ -1511,6 +1511,14 @@ static int32_t cc_replay_normalise(InteractiveConsole& console, const arguments_
|
||||
std::string inputFile = argv[0];
|
||||
std::string outputFile = argv[1];
|
||||
|
||||
if (!String::EndsWith(outputFile, ".sv6r", true))
|
||||
{
|
||||
outputFile += ".sv6r";
|
||||
}
|
||||
std::string outPath = OpenRCT2::GetContext()->GetPlatformEnvironment()->GetDirectoryPath(
|
||||
OpenRCT2::DIRBASE::USER, OpenRCT2::DIRID::REPLAY);
|
||||
outputFile = Path::Combine(outPath, outputFile);
|
||||
|
||||
auto* replayManager = OpenRCT2::GetContext()->GetReplayManager();
|
||||
if (replayManager->NormaliseReplay(inputFile, outputFile))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user