<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Hi Robert,</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">thanks for the tests. </div><div class="gmail_default" style="font-family:tahoma,sans-serif">You're right I was not concatenating the paths correctly, </div><div class="gmail_default" style="font-family:tahoma,sans-serif">but the concatenation was ok in the default case,</div><div class="gmail_default" style="font-family:tahoma,sans-serif">as the directory path contains a final slash.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Now I've realised THAT is the case when the issue comes up:</div><div class="gmail_default" style="font-family:tahoma,sans-serif">if you use a directory path which has the final slash, </div><div class="gmail_default" style="font-family:tahoma,sans-serif">findFileInDirectory() fails to find the full path.</div><div class="gmail_default" style="font-family:tahoma,sans-serif">Remove the trailing slash and everything works fine.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">This happens (at least on OSX) even if you run the example you sent me back without arguments.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">I'm re-attaching your example with the concatenation done the right way as you suggested.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Thanks,</div><div class="gmail_default" style="font-family:tahoma,sans-serif">Riccardo</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_extra">
<br><div class="gmail_quote">On Tue, Mar 27, 2018 at 6:38 PM, Robert Osfield <span dir="ltr"><<a href="mailto:robert.osfield@gmail.com" target="_blank">robert.osfield@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have just run the test case with a file with the wrong case to see<br>
what would happen, the results look 100% correct:<br>
<br>
$ ./test --dir ~/OpenSceneGraph/include/osg  --file version<br>
<span>Result with findFileInDirectory(): 1<br>
/home/robert/OpenSceneGraph/in<wbr>clude/osg/Version<br>
Result with fileExists(): 0<br>
</span>concatenated=/home/robert/Open<wbr>SceneGraph/include/osgversion<br>
Result with fileExists(): 0<br>
proper_fileExsists=/home/rober<wbr>t/OpenSceneGraph/include/osg/<wbr>version<br>
<br>
This test was run under Linux, so at least on the Linux side things<br>
are working correctly.  I have to defer to others to test under OSX.<br>
<br>
Robert.<br>
______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph<wbr>.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.or<wbr>g/listinfo.cgi/osg-users-opens<wbr>cenegraph.org</a><br>
</blockquote></div><br></div></div>