mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 17:19:22 +02:00
IDE: check duplicate source files: do not warn files of shared source directories
git-svn-id: trunk@48994 -
This commit is contained in:
parent
02e2574269
commit
e67cae9ede
@ -759,6 +759,9 @@ var
|
||||
|
||||
function CheckIfFilesCanConflict(FileGroup: TPGIPAmbiguousFileGroup;
|
||||
File1, File2: TPGInterPkgFile): boolean;
|
||||
var
|
||||
FileDir1: String;
|
||||
FileDir2: String;
|
||||
begin
|
||||
Result:=false;
|
||||
// report only one unit per package
|
||||
@ -777,6 +780,19 @@ var
|
||||
// => skip
|
||||
exit;
|
||||
end;
|
||||
FileDir1:=ExtractFilePath(File1.FullFilename);
|
||||
FileDir2:=ExtractFilePath(File2.FullFilename);
|
||||
if (FindPathInSearchPath(FileDir1,File2.OwnerInfo.SrcDirs)>0)
|
||||
or (FindPathInSearchPath(FileDir2,File1.OwnerInfo.SrcDirs)>0) then
|
||||
begin
|
||||
// File1 in SrcDirs of file owner 2
|
||||
// or File2 in SrcDirs of file owner 1
|
||||
// => a warning about sharing source directories is enough
|
||||
// don't warn every shared file
|
||||
// => skip
|
||||
exit;
|
||||
end;
|
||||
|
||||
Result:=true;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user