Added preprending of osgPlugins-version to plugin names

This commit is contained in:
Robert Osfield
2007-08-11 17:44:06 +00:00
parent d57a16e023
commit babe9f6de0
2 changed files with 10 additions and 8 deletions

View File

@@ -65,7 +65,6 @@
#endif
#include <osg/Notify>
#include <osg/Version>
#include <osgDB/FileUtils>
#include <osgDB/FileNameUtils>
@@ -75,7 +74,6 @@
#include <stack>
const std::string OSG_PLUGINS(std::string("osgPlugins-")+std::string(osgGetVersion())+std::string("/"));
bool osgDB::makeDirectory( const std::string &path )
{
@@ -317,9 +315,8 @@ std::string osgDB::findLibraryFile(const std::string& filename,CaseSensitivity c
if (!fileFound.empty()) return fileFound;
}
// failed with direct paths,
// now try prepending the filename with "osgPlugins/"
return findFileInPath(OSG_PLUGINS+simpleFileName,filepath,caseSensitivity);
// failed return empty string.
return std::string();
}
std::string osgDB::findFileInDirectory(const std::string& fileName,const std::string& dirName,CaseSensitivity caseSensitivity)