From Joan Abadie: patch fixes : "osgDB::makeDirectory doesn't work on win32 when using full path name like : "d:/demo"
it tryes a mkdir("d:")."
This commit is contained in:
parent
6cd4dbfac4
commit
16d844090f
@ -107,6 +107,14 @@ bool osgDB::makeDirectory( const std::string &path )
|
||||
{
|
||||
std::string dir = paths.top();
|
||||
|
||||
#if defined(WIN32)
|
||||
//catch drive name
|
||||
if (dir.size() == 2 && dir.c_str()[1] == ':') {
|
||||
paths.pop();
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
if( mkdir( dir.c_str(), 0755 )< 0 )
|
||||
{
|
||||
osg::notify(osg::DEBUG_INFO) << "osgDB::makeDirectory(): " << strerror(errno) << std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user