BUG: Do not create a directory on top of a file.
This commit is contained in:
parent
ab579c5108
commit
a2949c204d
@ -235,10 +235,16 @@ const char* SystemTools::GetExecutableExtension()
|
|||||||
|
|
||||||
bool SystemTools::MakeDirectory(const char* path)
|
bool SystemTools::MakeDirectory(const char* path)
|
||||||
{
|
{
|
||||||
if(SystemTools::FileExists(path))
|
if(SystemTools::FileIsDirectory(path))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Do not make a directory on top of a file.
|
||||||
|
if(SystemTools::FileExists(path))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
kwsys_stl::string dir = path;
|
kwsys_stl::string dir = path;
|
||||||
if(dir.size() == 0)
|
if(dir.size() == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user