From ea0fc335d14664295d72d51eba7cf9ed804fffe3 Mon Sep 17 00:00:00 2001 From: michael Date: Fri, 12 Jan 2007 19:36:24 +0000 Subject: [PATCH] * Fixed FileExists for >2GB files git-svn-id: trunk@5929 - --- rtl/unix/sysutils.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rtl/unix/sysutils.pp b/rtl/unix/sysutils.pp index e10be2f81f..cb0a5b68d1 100644 --- a/rtl/unix/sysutils.pp +++ b/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;