Hi Ulrich and Jason, On Fri, Jun 5, 2009 at 8:53 AM, Ulrich Hertlein<[email protected]> wrote: >> It makes sense to me that if the filename contain's a server path that >> no local searching should be done within the OSG_FILE_PATH. Would that >> just be a simple check in osgDB:;findDataFile to simply return the >> filename if the incoming file is a URL or is there more places that need >> tweaking? > > Wouldn't it make more sense to return an empty string (or false, or an > exception) if the filename is a URL? The caller needs to know that this > isn't a valid filename.
I think the two main options we have are to return an empty string from osgDB::findDataFile() or the original string when the input string contains a server address. Personally I'd suggest that if findDataFile() can't local the file locally then it should return a empty string which signifies failure to find the file. If we don't return an empty string then plugins that can't handle http will try to open the URL and fail. If a plugin is able to handle server protocols then they won't be using findDataFile(). Robert. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
