fix, possible bug when getting cwd and if project drive was not the first

This commit is contained in:
Basile Burg 2015-09-16 03:23:35 +02:00
parent f3ee6451b8
commit 46af83d137
2 changed files with 3 additions and 4 deletions

View File

@ -338,7 +338,7 @@ end;
function TCEDubProject.compile: boolean;
var
dubproc: TProcess;
olddir: string = '';
olddir: string;
prjname: string;
msgs: ICEMessagesDisplay;
begin
@ -347,7 +347,7 @@ begin
msgs.clearByData(Self as ICECommonProject);
prjname := shortenPath(fFilename);
dubproc := TProcess.Create(nil);
getDir(0, olddir);
olddir := GetCurrentDir;
try
msgs.message('compiling ' + prjname, self as ICECommonProject, amcProj, amkInf);
chDir(extractFilePath(fFilename));

View File

@ -703,8 +703,7 @@ begin
//
prjname := shortenPath(filename, 25);
compilproc := TProcess.Create(nil);
olddir := '';
getDir(0, olddir);
olddir := GetCurrentDir;
try
msgs.message('compiling ' + prjname, self as ICECommonProject, amcProj, amkInf);
prjpath := extractFilePath(fileName);