diff --git a/src/osgPlugins/osga/ReaderWriterOSGA.cpp b/src/osgPlugins/osga/ReaderWriterOSGA.cpp index 8859777b2..d5b459b80 100644 --- a/src/osgPlugins/osga/ReaderWriterOSGA.cpp +++ b/src/osgPlugins/osga/ReaderWriterOSGA.cpp @@ -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 archive = new OSGA_Archive; if (!archive->open(fileName, status, indexBlockSize)) {