gazebosim / gazebosim/sdformat

Converter's file search semantics are unclear and problematic

Open
#57 1 comment 0 reactions 0 assignees View on GitHub
bug major
Dominant language
C++
Stars
216
Forks
125
Avg merge
1d 14h
Merged PRs (30d)
14

Description

**Original report ([archived issue](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/issues/57)) by andy_somerville (Bitbucket: [andy_somerville](https://bitbucket.org/%7B09fd5d4b-d90e-4416-9a6a-2e5cd638472c%7D/)).**

----------------------------------------
`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");
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.