diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-04-29 17:25:02 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-04-29 17:25:02 (GMT) |
commit | d5763a8c98c9b37096b8ca6ff58a1996528c408c (patch) | |
tree | 57f3b8d5f11d5e009f19ffaec5f0895c689b3d38 | |
parent | 7ca0eb8bbc8fcf86f713e30b27cea0b772da34d3 (diff) | |
download | CMake-d5763a8c98c9b37096b8ca6ff58a1996528c408c.zip CMake-d5763a8c98c9b37096b8ca6ff58a1996528c408c.tar.gz CMake-d5763a8c98c9b37096b8ca6ff58a1996528c408c.tar.bz2 |
BUG: Most of time when asking if file exists, we actually want to read it... Should fix Bug #809 - FIND_INCLUDE should check readability
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 63256fc..6d3481c 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/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; } |