editor: Do not copy and delete the scenario before saving

Günther Brammer 2011-09-28 01:10:31 +02:00
parent 562816cfe5
commit 1f160083d7
1 changed files with 1 additions and 4 deletions

View File

@ -263,11 +263,8 @@ bool C4Console::FileSaveAs(bool fSaveGame)
OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY,
true)) return false;
DefaultExtension(&filename,"ocs");
bool fOkay=true;
// Close current scenario file
if (!Game.ScenarioFile.Close()) fOkay=false;
// Copy current scenario file to target
if (!C4Group_CopyItem(Game.ScenarioFilename,filename.getData())) fOkay=false;
Game.ScenarioFile.Close();
if (fSaveGame)
// Save game
return SaveGame(filename.getData());