Marcus, > > #ifdef WIN32 > > std::string docUriString = > > doc->getDocumentURI()->getFilepath(); > > docUriString += doc->getDocumentURI()->getFile(); > > daeURI docUri( _strlwr( (char *)docUriString.c_str() ) ); > > imgif->getValue().makeRelativeTo( &docUri ); > > #else > > imgif->getValue().makeRelativeTo( doc->getDocumentURI() ); > > #endif > > I'd be concerned about this because it is writing URL into documents > that have been converted to lowercase, thus potentially making the > documents non-portable across platforms. Eg if the path part was > originally intercap in any way then it is going to break. > > On Windows you want to do case-insensitive comparisons and yet remain > case-preserving on the output. >
Agreed but I could not think of a way of doing it other than doing a case insensitive compare of the relative path against the lowercase absolute one, finding out how many trailing chars matched and then replacing them with the same number of trailing chars from the original mixed case path. But that just seemed a recipe for errors. Comments anyone? Roger _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
