[osg-submissions] Fix for specifying absolute paths for output in osgdem
Jason Beverage
jasonbeverage at gmail.com
Wed Jun 18 09:52:22 PDT 2008
Hi Robert,
I was using latest SVN of VPB but after doing a full rebuild my problem went
away and the code works as advertised. VS must have not picked up the
change to FileUtils.cpp for some reason.
Sorry for the noise!
Jason
On Wed, Jun 18, 2008 at 12:22 PM, Robert Osfield <robert.osfield at gmail.com>
wrote:
> Hi Jason,
>
> I looks to me like the code in SVN will work, but just do a test that
> isn't required i.e. to check in c:/ exists, the code reads:
>
> if (pos_current == 2 && fullpath[1]==':')
> directories.push_back(std::string(fullpath,0,
> pos_current+1));
> else
> directories.push_back(std::string(fullpath,0,
> pos_current));
>
> Note the first branch is what will detect the c: and then do a special
> case for it. In your own case you've done:
>
> if (pos_current != 2 && fullpath[1]!=':')
> directories.push_back(std::string(fullpath,0,
> pos_current));
>
> Which I guess has the intent of not producing the c:/ case at all,
> which is equivalent to doing a not in the code in SVN i.e
>
> if ( !(pos_current == 2 && fullpath[1]==':') )
> directories.push_back(std::string(fullpath,0,
> pos_current));
>
> Which if you move the ! into the nested brackect you get:
>
> if ( pos_current != 2 || fullpath[1]!=':' )
> directories.push_back(std::string(fullpath,0,
> pos_current));
>
> Which is different from what you have - you have a && instead of a ||,
> which makes me wonder if you are attempting to do the above, but have
> just made a mistake in the logic.
>
> Could you confirm what you are trying to achieve with your change, and
> if my reading of the correct solution is appropriate? If it is I'll
> check it in.
>
> Robert.
> _______________________________________________
> osg-submissions mailing list
> osg-submissions at lists.openscenegraph.org
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20080618/031081d2/attachment.htm>
More information about the osg-submissions
mailing list