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