Browse Source

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

git-svn-id: trunk@36313 -
pierre 8 years ago
parent
commit
87bb473780
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tests/utils/dosbox/dosbox_wrapper.pas

+ 2 - 2
tests/utils/dosbox/dosbox_wrapper.pas

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