Fixed openArchive so that it only enforces the checking of the archive's existance

when in READ mode.
This commit is contained in:
Robert Osfield
2004-11-13 10:24:07 +00:00
parent fb631059fe
commit de4dc63ca7

View File

@@ -19,12 +19,17 @@ public:
virtual ReadResult openArchive(const std::string& file,ArchiveStatus status, unsigned int indexBlockSize = 4096, const Options* = NULL)
{
std::string ext = osgDB::getLowerCaseFileExtension(file);
if (!acceptsExtension(ext)) return ReadResult::FILE_NOT_HANDLED;
std::string fileName = osgDB::findDataFile( file );
if (fileName.empty()) return ReadResult::FILE_NOT_FOUND;
if (fileName.empty())
{
if (status==READ) return ReadResult::FILE_NOT_FOUND;
fileName = file;
}
osg::ref_ptr<OSGA_Archive> archive = new OSGA_Archive;
if (!archive->open(fileName, status, indexBlockSize))
{