mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-12 06:40:38 +01:00
LCL: fixed ExtractFilenameOnly
git-svn-id: trunk@12792 -
This commit is contained in:
parent
1b327c6dde
commit
2f279ae0fa
@ -7547,7 +7547,7 @@ begin
|
|||||||
if Project1.MainUnitID>=0 then begin
|
if Project1.MainUnitID>=0 then begin
|
||||||
// read MainUnit Source
|
// read MainUnit Source
|
||||||
Result:=LoadCodeBuffer(NewBuf,Project1.MainFilename,
|
Result:=LoadCodeBuffer(NewBuf,Project1.MainFilename,
|
||||||
[lbfUpdateFromDisk,lbfRevert,lbfCheckIfText]);
|
[lbfUpdateFromDisk,lbfRevert]);// do not check if source is text
|
||||||
if (Result<>mrOk) then exit;
|
if (Result<>mrOk) then exit;
|
||||||
Project1.MainUnitInfo.Source:=NewBuf;
|
Project1.MainUnitInfo.Source:=NewBuf;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -720,7 +720,7 @@ begin
|
|||||||
do
|
do
|
||||||
dec(StartPos);
|
dec(StartPos);
|
||||||
ExtPos:=length(AFilename);
|
ExtPos:=length(AFilename);
|
||||||
while (ExtPos>=StartPos) and (AFilename[StartPos]<>'.') do
|
while (ExtPos>=StartPos) and (AFilename[ExtPos]<>'.') do
|
||||||
dec(ExtPos);
|
dec(ExtPos);
|
||||||
if (ExtPos<StartPos) then ExtPos:=length(AFilename)+1;
|
if (ExtPos<StartPos) then ExtPos:=length(AFilename)+1;
|
||||||
Result:=copy(AFilename,StartPos,ExtPos-StartPos);
|
Result:=copy(AFilename,StartPos,ExtPos-StartPos);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user