mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-18 15:39:05 +02:00
pastojs: uses in filename: if not found try pcu
This commit is contained in:
parent
7e1adf88b7
commit
48b8b21dba
@ -4793,9 +4793,8 @@ begin
|
|||||||
end else begin
|
end else begin
|
||||||
// search Pascal file with InFilename
|
// search Pascal file with InFilename
|
||||||
FoundPasFilename:=FS.FindUnitFileName(UseUnitname,InFilename,ModuleDir,FoundPasIsForeign);
|
FoundPasFilename:=FS.FindUnitFileName(UseUnitname,InFilename,ModuleDir,FoundPasIsForeign);
|
||||||
if FoundPasFilename='' then
|
if FoundPasFilename<>'' then
|
||||||
exit; // an in-filename unit source is missing -> stop
|
FoundPasUnitName:=ExtractFilenameOnly(InFilename);
|
||||||
FoundPasUnitName:=ExtractFilenameOnly(InFilename);
|
|
||||||
|
|
||||||
// Note: at the moment if there is a source do not search for pcu
|
// Note: at the moment if there is a source do not search for pcu
|
||||||
// Eventually search for both, load pcu and if that fails unload pcu and load source
|
// Eventually search for both, load pcu and if that fails unload pcu and load source
|
||||||
@ -4804,7 +4803,9 @@ begin
|
|||||||
// no pas file -> search pcu
|
// no pas file -> search pcu
|
||||||
FoundPCUFilename:=PCUSupport.FindPCU(UseUnitName);
|
FoundPCUFilename:=PCUSupport.FindPCU(UseUnitName);
|
||||||
if FoundPCUFilename<>'' then
|
if FoundPCUFilename<>'' then
|
||||||
|
begin
|
||||||
FoundPCUUnitName:=UseUnitName;
|
FoundPCUUnitName:=UseUnitName;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user