pastojs: uses in filename: if not found try pcu

This commit is contained in:
mattias 2020-10-26 12:15:39 +00:00
parent 7e1adf88b7
commit 48b8b21dba

View File

@ -4793,8 +4793,7 @@ begin
end else begin
// search Pascal file with InFilename
FoundPasFilename:=FS.FindUnitFileName(UseUnitname,InFilename,ModuleDir,FoundPasIsForeign);
if FoundPasFilename='' then
exit; // an in-filename unit source is missing -> stop
if FoundPasFilename<>'' then
FoundPasUnitName:=ExtractFilenameOnly(InFilename);
// Note: at the moment if there is a source do not search for pcu
@ -4804,9 +4803,11 @@ begin
// no pas file -> search pcu
FoundPCUFilename:=PCUSupport.FindPCU(UseUnitName);
if FoundPCUFilename<>'' then
begin
FoundPCUUnitName:=UseUnitName;
end;
end;
end;
if (FoundPasFilename='') and (FoundPCUFilename<>'') then
begin