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

This commit is contained in:
Andy Cedilnik 2004-04-29 13:25:02 -04:00
parent 7ca0eb8bbc
commit d5763a8c98
1 changed files with 3 additions and 3 deletions

View File

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