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:
Robert Osfield 2006-06-08 11:22:45 +00:00
parent 6cd4dbfac4
commit 16d844090f

View File

@ -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;