mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 14:09:17 +02:00
* FileSearch needs to check first the file in the
current dir git-svn-id: trunk@10128 -
This commit is contained in:
parent
859deca93f
commit
3ffcb2244e
@ -24,9 +24,12 @@
|
|||||||
Temp : String;
|
Temp : String;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:='';
|
// Start with checking the file in the current directory
|
||||||
temp:=SetDirSeparators(DirList);
|
Result:=Name;
|
||||||
|
temp:=SetDirSeparators(DirList);
|
||||||
repeat
|
repeat
|
||||||
|
If (Result<>'') and FileExists(Result) Then
|
||||||
|
exit;
|
||||||
I:=pos(PathSeparator,Temp);
|
I:=pos(PathSeparator,Temp);
|
||||||
If I<>0 then
|
If I<>0 then
|
||||||
begin
|
begin
|
||||||
@ -38,14 +41,10 @@
|
|||||||
Result:=Temp;
|
Result:=Temp;
|
||||||
Temp:='';
|
Temp:='';
|
||||||
end;
|
end;
|
||||||
if Result<>'' then
|
if Result<>'' then
|
||||||
begin
|
Result:=IncludeTrailingPathDelimiter(Result)+name;
|
||||||
Result:=IncludeTrailingPathDelimiter(Result)+name;
|
|
||||||
If FileExists(Result) Then
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
until temp='';
|
until temp='';
|
||||||
result:='';
|
result:='';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ifndef OS_FILEISREADONLY}
|
{$ifndef OS_FILEISREADONLY}
|
||||||
|
Loading…
Reference in New Issue
Block a user