Added handling of error condition

This commit is contained in:
Robert Osfield 2016-06-30 11:28:59 +01:00
parent 6cd944e9c3
commit 9e7d361a50

View File

@ -61,7 +61,10 @@ class sgReaderWriterOSGTGZ : public osgDB::ReaderWriter
sprintf( command,
"tar xfCz %s %s",
fileName.c_str(), dirname );
mkdir( dirname, 0700 );
if (mkdir( dirname, 0700 )<0)
{
return ReadResult::ERROR_IN_READING_FILE;
}
#endif
#ifdef __sgi