diff options
author | Brad King <brad.king@kitware.com> | 2004-06-07 17:55:20 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2004-06-07 17:55:20 (GMT) |
commit | a2949c204d02baf8253e8787178cfd5de36f8fd9 (patch) | |
tree | bcf8174ae330b1e3caa7b6ba08ea7c7d70a9e4f6 /Source/kwsys | |
parent | ab579c5108ca14a4c3863762e7101f60b17a8b9b (diff) | |
download | CMake-a2949c204d02baf8253e8787178cfd5de36f8fd9.zip CMake-a2949c204d02baf8253e8787178cfd5de36f8fd9.tar.gz CMake-a2949c204d02baf8253e8787178cfd5de36f8fd9.tar.bz2 |
BUG: Do not create a directory on top of a file.
Diffstat (limited to 'Source/kwsys')
-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) { |