diff options
Diffstat (limited to 'Source/kwsys/SystemTools.cxx')
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index d0601ff..b99b55d 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -235,10 +235,16 @@ const char* SystemTools::GetExecutableExtension() bool SystemTools::MakeDirectory(const char* path) { - if(SystemTools::FileExists(path)) + if(SystemTools::FileIsDirectory(path)) { return true; } + + // Do not make a directory on top of a file. + if(SystemTools::FileExists(path)) + { + return false; + } kwsys_stl::string dir = path; if(dir.size() == 0) { |