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

View File

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