diff --git a/src/osgPlugins/vrml/ReaderWriterVRML2.cpp b/src/osgPlugins/vrml/ReaderWriterVRML2.cpp index 0af7c63b1..31879b05e 100644 --- a/src/osgPlugins/vrml/ReaderWriterVRML2.cpp +++ b/src/osgPlugins/vrml/ReaderWriterVRML2.cpp @@ -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);