From Joakim Simonsson, added osgDB::concateFile and osgDB::getRealPath.

Tweaks by Robert Osfield - Moved methods to FileNameUtils, added unix
implementation of getRealPath add extern and OSGDB_EXPORT to function declarations.
This commit is contained in:
Robert Osfield
2007-01-17 15:59:29 +00:00
parent d63b351137
commit 3ebc5efe05
3 changed files with 50 additions and 14 deletions

View File

@@ -203,7 +203,10 @@ std::string osgDB::findFileInPath(const std::string& filename, const FilePathLis
++itr)
{
osg::notify(osg::DEBUG_INFO) << "itr='" <<*itr<< "'\n";
std::string path = itr->empty() ? filename : *itr + '/'+ filename;
std::string path = itr->empty() ? filename : concatPaths(*itr, filename);
path = getRealPath(path);
osg::notify(osg::DEBUG_INFO) << "FindFileInPath() : trying " << path << " ...\n";
if(fileExists(path))
{