diff --git a/src/osgPlugins/curl/ReaderWriterCURL.cpp b/src/osgPlugins/curl/ReaderWriterCURL.cpp index 73d28d39e..731fdd56e 100644 --- a/src/osgPlugins/curl/ReaderWriterCURL.cpp +++ b/src/osgPlugins/curl/ReaderWriterCURL.cpp @@ -112,7 +112,16 @@ class ReaderWriterCURL : public osgDB::ReaderWriter { if (!osgDB::containsServerAddress(fullFileName)) { - osg::notify(osg::NOTICE)<<"File '"<getDatabasePathList().empty())) + { + if (osgDB::containsServerAddress(options->getDatabasePathList().front())) + { + std::string newFileName = options->getDatabasePathList().front() + "/" + fullFileName; + + return readFile(objectType, newFileName,options); + } + } + return ReadResult::FILE_NOT_HANDLED; } @@ -132,7 +141,7 @@ class ReaderWriterCURL : public osgDB::ReaderWriter if (!reader) { - osg::notify(osg::NOTICE)<<"No ReaderWriter for file "< local_opt = const_cast(options); if (!local_opt) local_opt = new Options; - if (local_opt.valid() && local_opt->getDatabasePathList().empty()) - { - local_opt->getDatabasePathList().push_front(osgDB::getFilePath(fileName)); - } + local_opt->getDatabasePathList().push_front(osgDB::getFilePath(fileName)); ReadResult result = readFile(objectType, reader, buffer, local_opt.get() ); @@ -164,7 +170,7 @@ class ReaderWriterCURL : public osgDB::ReaderWriter } else { - osg::notify(osg::NOTICE)<<"Read error, file="<