[cmake-commits] hoffman committed SystemTools.cxx 1.216 1.217
SystemTools.hxx.in 1.69 1.70
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Dec 14 20:31:29 EST 2007
Update of /cvsroot/CMake/CMake/Source/kwsys
In directory public:/mounts/ram/cvs-serv30089/Source/kwsys
Modified Files:
SystemTools.cxx SystemTools.hxx.in
Log Message:
BUG: fix for bug 6136 make sure includes are not directories
Index: SystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/SystemTools.cxx,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -d -r1.216 -r1.217
--- SystemTools.cxx 6 Dec 2007 21:43:11 -0000 1.216
+++ SystemTools.cxx 15 Dec 2007 01:31:27 -0000 1.217
@@ -821,7 +821,7 @@
// return true if the file exists
-bool SystemTools::FileExists(const char* filename)
+bool SystemTools::FileExists(const char* filename, bool isFile)
{
#ifdef _MSC_VER
# define access _access
@@ -843,6 +843,12 @@
}
else
{
+ // If isFile is set return not FileIsDirectory,
+ // so this will only be true if it is a file
+ if(isFile)
+ {
+ return !SystemTools::FileIsDirectory(filename);
+ }
return true;
}
}
Index: SystemTools.hxx.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/SystemTools.hxx.in,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- SystemTools.hxx.in 5 Dec 2007 17:24:27 -0000 1.69
+++ SystemTools.hxx.in 15 Dec 2007 01:31:27 -0000 1.70
@@ -270,9 +270,12 @@
static kwsys_stl::string ConvertToWindowsOutputPath(const char*);
/**
- * Return true if a file exists in the current directory
+ * Return true if a file exists in the current directory.
+ * If isFile = true, then make sure the file is a file and
+ * not a directory. If isFile = false, then return true
+ * if it is a file or a directory.
*/
- static bool FileExists(const char* filename);
+ static bool FileExists(const char* filename, bool isFile=false);
/**
* Return file length
More information about the Cmake-commits
mailing list