Skip to content
Snippets Groups Projects
Commit 8c837944 authored by Brad King's avatar Brad King
Browse files

BUG: Do not create a directory on top of a file.

parent 145f6dc3
No related branches found
No related tags found
No related merge requests found
......@@ -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)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment