fix, maybe an issue with CWD after running a proj

This commit is contained in:
Basile Burg 2016-01-25 03:53:28 +01:00
parent 097875dd59
commit fad3396ff3
1 changed files with 3 additions and 3 deletions

View File

@ -814,11 +814,11 @@ begin
end; end;
// //
fRunner.Executable := outputFilename; fRunner.Executable := outputFilename;
fRunnerOldCwd := GetCurrentDirUTF8;
if fRunner.CurrentDirectory.isEmpty then if fRunner.CurrentDirectory.isEmpty then
begin begin
fRunnerOldCwd := GetCurrentDirUTF8;
cwd := fRunner.Executable.extractFilePath; cwd := fRunner.Executable.extractFilePath;
chDir(cwd); SetCurrentDirUTF8(cwd);
fRunner.CurrentDirectory := cwd; fRunner.CurrentDirectory := cwd;
end; end;
if poUsePipes in fRunner.Options then begin if poUsePipes in fRunner.Options then begin
@ -855,7 +855,7 @@ begin
if not proc.Running then if not proc.Running then
begin begin
getprocInputHandler.removeProcess(TProcess(sender)); getprocInputHandler.removeProcess(TProcess(sender));
ChDir(fRunnerOldCwd); SetCurrentDirUTF8(fRunnerOldCwd);
// //
if (proc.ExitStatus <> 0) then if (proc.ExitStatus <> 0) then
msgs.message(format('error: the process (%s) has returned the signal %d', msgs.message(format('error: the process (%s) has returned the signal %d',