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

This commit is contained in:
Brad King 2004-06-07 13:55:20 -04:00
parent ab579c5108
commit a2949c204d

View File

@ -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)
{