Added back in support for checking the current working directory by default, but now do the check

after the Options and Registry DataFilePathLists have been checked, which will allow users to better control
over where files are searched for.
This commit is contained in:
Robert Osfield
2012-02-09 14:28:39 +00:00
parent 89cf88f2a9
commit 5f4c155d6b
3 changed files with 45 additions and 10 deletions

View File

@@ -652,6 +652,19 @@ osgDB::FileOpResult::Value osgDB::copyFile(const std::string & source, const std
}
bool osgDB::containsCurrentWorkingDirectoryReference(const FilePathList& paths)
{
const std::string cwd(".");
for(FilePathList::const_iterator itr = paths.begin();
itr != paths.end();
++itr)
{
if (itr->empty()) return true;
if (*itr==cwd) return true;
}
return false;
}
/////////////////////////////////////////////////////////////////////////////////////////////////
//
// Implementation of appendPlatformSpecificLibraryFilePaths(..)
@@ -1226,7 +1239,3 @@ osgDB::FileOpResult::Value osgDB::copyFile(const std::string & source, const std
#endif