From Jean-Sebastien Guay, "After a bit more testing, it was still not 100% robust, so this fix
will bring the change in line with what is done on other OSes (Linux) and works in all tested cases. For reference, this was tested with: osgviewer <file>.wrl (file in current directory) osgviewer <dir>\<file>.wrl (file in child directory, relative) osgviewer .\<dir>\<file>.wrl (file in child directory, specify current) osgviewer <drive>:\<dir>\<file>.wrl (absolute path) "
This commit is contained in:
@@ -81,13 +81,13 @@ osgDB::ReaderWriter::ReadResult ReaderWriterVRML2::readNode(const std::string &f
|
||||
std::string unixFileName = osgDB::convertFileNameToUnixStyle(fileName);
|
||||
|
||||
#ifdef WIN32
|
||||
fileName = "file://" + unixFileName;
|
||||
if(unixFileName[1] == ':') // absolute path
|
||||
#else
|
||||
if(unixFileName[0] == '/') // absolute path
|
||||
#endif
|
||||
fileName = "file://" + unixFileName;
|
||||
else // relative path
|
||||
fileName = unixFileName;
|
||||
#endif
|
||||
|
||||
std::fstream null;
|
||||
openvrml::browser *browser = new openvrml::browser(null, null);
|
||||
|
||||
Reference in New Issue
Block a user