Browse Source

* fixed broken DirectoryExists

git-svn-id: trunk@2136 -
florian 19 years ago
parent
commit
a8e4073903
1 changed files with 3 additions and 13 deletions
  1. 3 13
      compiler/globals.pas

+ 3 - 13
compiler/globals.pas

@@ -39,8 +39,9 @@ interface
       Baseunix,unix,
       Baseunix,unix,
   {$endif}
   {$endif}
 {$endif}
 {$endif}
-{$IFDEF USE_SYSUTILS}
+      { comphook pulls in sysutils anyways }
       SysUtils,
       SysUtils,
+{$IFDEF USE_SYSUTILS}
 {$ELSE USE_SYSUTILS}
 {$ELSE USE_SYSUTILS}
       strings,
       strings,
       dos,
       dos,
@@ -617,19 +618,8 @@ implementation
 
 
 
 
     Function DirectoryExists ( Const F : String) : Boolean;
     Function DirectoryExists ( Const F : String) : Boolean;
-{$IFDEF USE_SYSUTILS}
-{$ELSE USE_SYSUTILS}
-      var
-         Info : SearchRec;
-{$ENDIF USE_SYSUTILS}
       begin
       begin
-{$IFDEF USE_SYSUTILS}
-        Result:=SysUtils.FileExists(f);
-{$ELSE USE_SYSUTILS}
-        findfirst(F,directory,info);
-        result:=(doserror=0);
-        findclose(Info);
-{$ENDIF USE_SYSUTILS}
+        Result:=SysUtils.DirectoryExists(f);
       end;
       end;