mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 21:09:27 +02:00
IDE: fixed macros
git-svn-id: trunk@28634 -
This commit is contained in:
parent
56e9d77a02
commit
ecf90eadcb
@ -1343,6 +1343,7 @@ end;
|
||||
- Removes empty paths.
|
||||
- Uses TrimFilename on every path.
|
||||
- If BaseDirectory<>'' then every relative Filename will be expanded.
|
||||
- removes doubles
|
||||
-------------------------------------------------------------------------------}
|
||||
function TrimSearchPath(const SearchPath, BaseDirectory: string): string;
|
||||
var
|
||||
@ -1366,9 +1367,13 @@ begin
|
||||
while (EndPos<=l) and (SearchPath[EndPos]<>';') do inc(EndPos);
|
||||
CurPath:=copy(SearchPath,StartPos,EndPos-StartPos);
|
||||
if CurPath<>'' then begin
|
||||
// non empty path => expand, trim and normalize
|
||||
if (BaseDir<>'') and (not FilenameIsAbsolute(CurPath)) then
|
||||
CurPath:=BaseDir+CurPath;
|
||||
CurPath:=ChompPathDelim(TrimFilename(CurPath));
|
||||
// check if path already exists
|
||||
// ToDo:
|
||||
|
||||
if Result<>'' then
|
||||
CurPath:=';'+CurPath;
|
||||
if CurPath<>'' then
|
||||
|
@ -369,6 +369,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
if not Handled then begin
|
||||
if fBusy=nil then fBusy:=TStringList.Create;
|
||||
try
|
||||
fBusy.Add(MacroName);
|
||||
if not SubstituteStr(MacroParam,Data,Depth+1) then begin
|
||||
|
Loading…
Reference in New Issue
Block a user