Hi Sukender, I just had a quick look at this and if I'm reading it right, valid paths such as "..\..\folder\thing.osg" would cause a warning in cleanPath() and would return an incorrect path.
On 10 February 2011 16:05, Sukender <[email protected]> wrote: > Hi Robert, > > This is kind of tricky submission... I found that the current getRealPath() > implementation for Windows doesn't work well with UTF8 paths. So I tried to > add the support using Unicode Windows API calls. But unfortunately, the > GetFullPathNameW() *corrupts the stack*! Yes... I've done multiple tries and > each with the same conclusion. I added a detailed comment about this, and > finally wrote my own implementation of this Windows API function. So you'll > find: > - getFullPathName(), a replacement for GetFullPathNameA() and > GetFullPathNameW() > - cleanPath(), which simply removes "." and ".." from a path > - and a modified getRealPath() > > This is a bit risky as this is quite low level. Moreover I cannot be sure > this submission 100% works in all cases, and I do not have access to more > robust impementations (ie. C++0x or boost::filesystem). > Please tell me if it seems okay for you. > > File modified: rev.12156. > > Cheers, > > Sukender > PVLE - Lightweight cross-platform game engine - > http://pvle.sourceforge.net/ > > _______________________________________________ > osg-submissions mailing list > [email protected] > > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > >
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
