mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-28 18:09:31 -06:00
BUG: Do not create a directory on top of a file.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user