mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-07 16:06:16 +02:00
* fixed filesearch
This commit is contained in:
parent
8f282730b9
commit
1bfc8ffbce
@ -271,6 +271,12 @@ Var
|
|||||||
I : longint;
|
I : longint;
|
||||||
Temp : String;
|
Temp : String;
|
||||||
begin
|
begin
|
||||||
|
{ check if the file specified exists }
|
||||||
|
If FileExists(Name) Then
|
||||||
|
begin
|
||||||
|
Result:=Name;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
Result:='';
|
Result:='';
|
||||||
temp:=Dirlist;
|
temp:=Dirlist;
|
||||||
repeat
|
repeat
|
||||||
@ -285,12 +291,12 @@ begin
|
|||||||
Result:=Temp;
|
Result:=Temp;
|
||||||
Temp:='';
|
Temp:='';
|
||||||
end;
|
end;
|
||||||
If result[length(result)]<>'\' then
|
If (result<>'') and (result[length(result)]<>'\') then
|
||||||
Result:=Result+'\';
|
Result:=Result+'\';
|
||||||
Result:=Result+name;
|
Result:=Result+name;
|
||||||
If not FileExists(Result) Then
|
If not FileExists(Result) Then
|
||||||
Result:='';
|
Result:='';
|
||||||
until (length(temp)=0) or (length(result)<>0);
|
until (Temp='') or (Result<>'');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -674,7 +680,10 @@ Finalization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.7 2001-04-16 10:57:05 peter
|
Revision 1.8 2001-05-20 12:08:36 peter
|
||||||
|
* fixed filesearch
|
||||||
|
|
||||||
|
Revision 1.7 2001/04/16 10:57:05 peter
|
||||||
* stricter compiler fixes
|
* stricter compiler fixes
|
||||||
|
|
||||||
Revision 1.6 2001/02/20 22:14:19 peter
|
Revision 1.6 2001/02/20 22:14:19 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user