diff --git a/src/osgDB/ReadFile.cpp b/src/osgDB/ReadFile.cpp index 8f9eeb0e1..4391fda8d 100644 --- a/src/osgDB/ReadFile.cpp +++ b/src/osgDB/ReadFile.cpp @@ -129,6 +129,14 @@ Node* osgDB::readNodeFiles(osg::ArgumentParser& arguments,const ReaderWriter::Op std::string filename; + while (arguments.read("--file-cache",filename)) + { + std::string str("OSG_FILE_CACHE="); + str += filename; + + putenv(strdup((char*)str.c_str())); + } + while (arguments.read("--image",filename)) { osg::ref_ptr image = readImageFile(filename.c_str(), options);