Procházet zdrojové kódy

BUG: Most of time when asking if file exists, we actually want to read it... Should fix Bug #809 - FIND_INCLUDE should check readability

Andy Cedilnik před 21 roky
rodič
revize
d5763a8c98
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 3 3
      Source/kwsys/SystemTools.cxx

+ 3 - 3
Source/kwsys/SystemTools.cxx

@@ -643,10 +643,10 @@ bool SystemTools::FileExists(const char* filename)
 #ifdef _MSC_VER
 # define access _access
 #endif
-#ifndef F_OK
-#define F_OK 0
+#ifndef R_OK
+# define R_OK 04
 #endif
-  if ( access(filename, F_OK) != 0 )
+  if ( access(filename, R_OK) != 0 )
     {
     return false;
     }