mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 18:24:19 +02:00
* fsearch checks if file exists first (merged)
This commit is contained in:
parent
475c7fab40
commit
24cc0eba5d
@ -717,7 +717,17 @@ var temp : PChar;
|
|||||||
lastchar : char;
|
lastchar : char;
|
||||||
name : namestr;
|
name : namestr;
|
||||||
ext : extstr;
|
ext : extstr;
|
||||||
|
s : SearchRec;
|
||||||
begin
|
begin
|
||||||
|
{ check if the file specified exists }
|
||||||
|
findfirst(path,anyfile,s);
|
||||||
|
if doserror=0 then
|
||||||
|
begin
|
||||||
|
findclose(s);
|
||||||
|
fsearch:=path;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
{ search the path }
|
||||||
fsearch:='';
|
fsearch:='';
|
||||||
for i:=1 to length(path) do
|
for i:=1 to length(path) do
|
||||||
if path[i]='/' then
|
if path[i]='/' then
|
||||||
@ -1004,7 +1014,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.2 2000-07-13 11:33:57 michael
|
Revision 1.3 2000-08-24 19:02:36 peter
|
||||||
|
* fsearch checks if file exists first (merged)
|
||||||
|
|
||||||
|
Revision 1.2 2000/07/13 11:33:57 michael
|
||||||
+ removed logs
|
+ removed logs
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user