scpeters-test / sdformat

Simulation Description Format (SDF) parser and description files.
http://sdformat.org
Other
1 stars 0 forks source link

Converter's file search semantics are unclear and problematic #57

Open scpeters-test opened 10 years ago

scpeters-test commented 10 years ago

Original report (archived issue) by andy_somerville (Bitbucket: andy_somerville).


Converter::Convert appears to make unnecessary assumptions about the file structure which prevent use case where parent directory to version number is not "sdformat" which includes source builds which have not yet been installed where the parent directory is named "sdf".

Additionally sdf::findFile itself prepends "sdformat" when searching the SDF_SHARE_PATH and so searches will not match as they will end up prepended with "sdformat/sdformat"

This specific case prevents certain test cases from running correctly.

Some clients may rely on this behavior so it may make sense to create fix which searches multiple paths decendent to SDF

sdformat/src/Converter.cc

#!c++
std::string filename = sdf::findFile(  std::string("sdformat/") 
    + _toVersion + "/" + origVersion + ".convert");
scpeters-test commented 10 years ago

Original comment by andy_somerville (Bitbucket: andy_somerville).


working on a patch