소스 검색

* Fixed FileExists for >2GB files

git-svn-id: trunk@5929 -
michael 18 년 전
부모
커밋
ea0fc335d1
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      rtl/unix/sysutils.pp

+ 3 - 3
rtl/unix/sysutils.pp

@@ -269,10 +269,10 @@ end;
 
 Function FileExists (Const FileName : String) : Boolean;
 
-Var Info : Stat;
-
 begin
-  FileExists:=fpstat(filename,Info)>=0;
+  // Don't use stat. It fails on files >2 GB.
+  // Access obeys the same access rules, so the result should be the same.
+  FileExists:=fpAccess(filename,F_OK)=0;
 end;