From de4dc63ca7ecafb715f8788d08569b90b56039a8 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 13 Nov 2004 10:24:07 +0000 Subject: [PATCH] Fixed openArchive so that it only enforces the checking of the archive's existance when in READ mode. --- src/osgPlugins/osga/ReaderWriterOSGA.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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)) {