mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 20:09:20 +02:00
* Fix bug #37445, find resource file in subdir
git-svn-id: trunk@46502 -
This commit is contained in:
parent
ca5e2ee16a
commit
460dc49d68
@ -1988,11 +1988,18 @@ var
|
|||||||
|
|
||||||
function SearchInDir(Dir: string; var Filename: string): boolean;
|
function SearchInDir(Dir: string; var Filename: string): boolean;
|
||||||
// search in Dir for pp, pas, p times given case, lower case, upper case
|
// search in Dir for pp, pas, p times given case, lower case, upper case
|
||||||
|
var
|
||||||
|
CurFile : String;
|
||||||
begin
|
begin
|
||||||
Dir:=IncludeTrailingPathDelimiter(Dir);
|
Dir:=IncludeTrailingPathDelimiter(Dir);
|
||||||
if IndexOfFile(SearchedDirs,Dir)>=0 then exit(false);
|
if IndexOfFile(SearchedDirs,Dir)>=0 then exit(false);
|
||||||
SearchedDirs.Add(Dir);
|
SearchedDirs.Add(Dir);
|
||||||
if SearchLowUpCase(Filename) then exit(true);
|
CurFile:=Dir+Filename;
|
||||||
|
if SearchLowUpCase(CurFile) then
|
||||||
|
begin
|
||||||
|
FileName:=CurFile;
|
||||||
|
exit(true);
|
||||||
|
end;
|
||||||
Result:=false;
|
Result:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user