mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-11 14:49:28 +02:00
Codetools: Do not raise exception for a non-existent unit name. The compiler accepts it.
This commit is contained in:
parent
a7e0868e6c
commit
dec24793c2
@ -933,20 +933,16 @@ end;
|
||||
|
||||
constructor TCTDirectoryCache.Create(const TheDirectory: string;
|
||||
ThePool: TCTDirectoryCachePool);
|
||||
|
||||
procedure RaiseDirNotAbsolute;
|
||||
begin
|
||||
raise Exception.Create('directory not absolute "'+FDirectory+'"');
|
||||
end;
|
||||
|
||||
begin
|
||||
FDirectory:=TrimFilename(TheDirectory);
|
||||
if FDirectory='.' then
|
||||
FDirectory:=''
|
||||
else
|
||||
FDirectory:=AppendPathDelim(FDirectory);
|
||||
if (FDirectory<>'') and not FilenameIsAbsolute(FDirectory) then
|
||||
RaiseDirNotAbsolute;
|
||||
// A non-existent unit name is not absolute, but the compiler may accept it.
|
||||
// eg. 'process331 in fcl-proc331/' Do not raise exception then.
|
||||
//if (FDirectory<>'') and not FilenameIsAbsolute(FDirectory) then
|
||||
// raise Exception.Create('directory not absolute "'+FDirectory+'"');
|
||||
FListing:=TCTDirectoryListing.Create;
|
||||
FPool:=ThePool;
|
||||
FRefCount:=1;
|
||||
|
Loading…
Reference in New Issue
Block a user