project groups: prevent adding itself

git-svn-id: trunk@50463 -
This commit is contained in:
mattias 2015-11-21 11:27:10 +00:00
parent 40bf0d940d
commit 78953ccba9

View File

@ -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;