LCL: fixed ExtractFilenameOnly

git-svn-id: trunk@12792 -
This commit is contained in:
mattias 2007-11-08 22:11:36 +00:00
parent 1b327c6dde
commit 2f279ae0fa
2 changed files with 2 additions and 2 deletions

View File

@ -7547,7 +7547,7 @@ begin
if Project1.MainUnitID>=0 then begin
// read MainUnit Source
Result:=LoadCodeBuffer(NewBuf,Project1.MainFilename,
[lbfUpdateFromDisk,lbfRevert,lbfCheckIfText]);
[lbfUpdateFromDisk,lbfRevert]);// do not check if source is text
if (Result<>mrOk) then exit;
Project1.MainUnitInfo.Source:=NewBuf;
end;

View File

@ -720,7 +720,7 @@ begin
do
dec(StartPos);
ExtPos:=length(AFilename);
while (ExtPos>=StartPos) and (AFilename[StartPos]<>'.') do
while (ExtPos>=StartPos) and (AFilename[ExtPos]<>'.') do
dec(ExtPos);
if (ExtPos<StartPos) then ExtPos:=length(AFilename)+1;
Result:=copy(AFilename,StartPos,ExtPos-StartPos);