mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 13:00:25 +02:00
project groups: prevent adding itself
git-svn-id: trunk@50463 -
This commit is contained in:
parent
40bf0d940d
commit
78953ccba9
@ -693,6 +693,8 @@ begin
|
||||
Result:=Nil;
|
||||
if not FilenameIsAbsolute(AFileName) then
|
||||
RaiseGDBException(AFileName);
|
||||
if CompareFilenames(AFileName,FileName)=0 then
|
||||
raise Exception.Create('Invalid cycle. A project group cannot have itself as target.');
|
||||
if not FileExistsCached(AFileName) then exit;
|
||||
Result:=TIDECompileTarget.Create(CompileTarget);
|
||||
Result.FileName:=AFileName;
|
||||
|
Loading…
Reference in New Issue
Block a user