2
0
Эх сурвалжийг харах

+ Patch from Michalis Kamburelis so FSearch does not find a directory

michael 20 жил өмнө
parent
commit
d73472e2e3
1 өөрчлөгдсөн 5 нэмэгдсэн , 2 устгасан
  1. 5 2
      rtl/unix/dos.pp

+ 5 - 2
rtl/unix/dos.pp

@@ -750,7 +750,7 @@ Function FSearch(path : pathstr;dirlist : string) : pathstr;
 Var
 Var
   info : BaseUnix.stat;
   info : BaseUnix.stat;
 Begin
 Begin
-  if (length(Path)>0) and (path[1]='/') and (fpStat(path,info)>=0) then
+  if (length(Path)>0) and (path[1]='/') and (fpStat(path,info)>=0) and (not fpS_ISDIR(Info.st_Mode)) then
     FSearch:=path
     FSearch:=path
   else
   else
     FSearch:=Unix.FSearch(path,dirlist);
     FSearch:=Unix.FSearch(path,dirlist);
@@ -892,7 +892,10 @@ End.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.42  2004-12-05 21:04:56  hajny
+  Revision 1.43  2004-12-18 16:29:09  michael
+  + Patch from Michalis Kamburelis so FSearch does not find a directory
+
+  Revision 1.42  2004/12/05 21:04:56  hajny
     * compilation fix for dosh.inc changes
     * compilation fix for dosh.inc changes
 
 
   Revision 1.41  2004/12/05 20:33:32  hajny
   Revision 1.41  2004/12/05 20:33:32  hajny