From 3c461dd70626fdf343d828023c24dd4d1a81a7c6 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 2 Nov 2011 10:57:17 +0000 Subject: [PATCH] Add check to filter out the return of FILE_NOT_FOUND from archive results to prevent these from prematurely exiting the Registry::read(..) method bofore it loads plugins to try and load requested file. --- src/osgDB/Registry.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/osgDB/Registry.cpp b/src/osgDB/Registry.cpp index e3fd20600..f68adb855 100644 --- a/src/osgDB/Registry.cpp +++ b/src/osgDB/Registry.cpp @@ -1111,7 +1111,12 @@ ReaderWriter::ReadResult Registry::read(const ReadFunctor& readFunctor) { ReaderWriter::ReadResult rr = readFunctor.doRead(*aaitr); if (readFunctor.isValid(rr)) return rr; - else results.push_back(rr); + else + { + // don't pass on FILE_NOT_FOUND results as we don't want to prevent non archive plugins that haven't been + // loaded yet from getting a chance to test for the presence of the file. + if (rr.status()!=ReaderWriter::ReadResult::FILE_NOT_FOUND) results.push_back(rr); + } }