Changed the path management so that the node path is prepended on the database path list, rather than replacing it.

This commit is contained in:
Robert Osfield
2008-09-10 11:27:45 +00:00
parent b0cf7823a7
commit c266cef6b1

View File

@@ -45,7 +45,7 @@ class OSGReaderWriter : public ReaderWriter
// code for setting up the database path so that internally referenced file are searched for on relative paths.
osg::ref_ptr<Options> local_opt = opt ? static_cast<Options*>(opt->clone(osg::CopyOp::SHALLOW_COPY)) : new Options;
local_opt->setDatabasePath(osgDB::getFilePath(fileName));
local_opt->getDatabasePathList().push_front(osgDB::getFilePath(fileName));
std::ifstream fin(fileName.c_str());
if (fin)
@@ -106,7 +106,7 @@ class OSGReaderWriter : public ReaderWriter
// code for setting up the database path so that internally referenced file are searched for on relative paths.
osg::ref_ptr<Options> local_opt = opt ? static_cast<Options*>(opt->clone(osg::CopyOp::SHALLOW_COPY)) : new Options;
local_opt->setDatabasePath(osgDB::getFilePath(fileName));
local_opt->getDatabasePathList().push_front(osgDB::getFilePath(fileName));
std::ifstream fin(fileName.c_str());
if (fin)