mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-08 12:39:18 +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;
|
Result:=Nil;
|
||||||
if not FilenameIsAbsolute(AFileName) then
|
if not FilenameIsAbsolute(AFileName) then
|
||||||
RaiseGDBException(AFileName);
|
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;
|
if not FileExistsCached(AFileName) then exit;
|
||||||
Result:=TIDECompileTarget.Create(CompileTarget);
|
Result:=TIDECompileTarget.Create(CompileTarget);
|
||||||
Result.FileName:=AFileName;
|
Result.FileName:=AFileName;
|
||||||
|
Loading…
Reference in New Issue
Block a user