Fix ExitCode readout if temp directory is used by postponing temp directory cleanup

git-svn-id: trunk@36313 -
This commit is contained in:
pierre 2017-05-24 07:41:25 +00:00
parent dd01b7ca8b
commit 87bb473780

View File

@ -347,8 +347,6 @@ begin
ExecuteDosBox(DosBoxBinaryPath, DosBoxDir);
finally
ExitProc;
if use_temp_dir then
Cleanup(DosBoxDir);
end;
{$ifdef UseSignals}
if SignalCalled then
@ -358,5 +356,7 @@ begin
{$endif def UseSignals}
ExitProc;
ExitCode:=ReadExitCode(DosBoxDir);
if use_temp_dir then
Cleanup(DosBoxDir);
halt(ExitCode);
end.