summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/SystemTools.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/kwsys/SystemTools.cxx')
-rw-r--r--Source/kwsys/SystemTools.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index 1248f29..977133f 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -821,7 +821,7 @@ bool SystemTools::SameFile(const char* file1, const char* file2)
// 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 @@ bool SystemTools::FileExists(const char* filename)
}
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;
}
}