ament / ament_index

Apache License 2.0
13 stars 27 forks source link

get_package_share_directory does not return a conventional Windows directory #45

Closed piraka9011 closed 4 years ago

piraka9011 commented 4 years ago

Running get_package_share_directory in Windows returns C:<path_to_ws>\install/share/. It should instead be C:<path_to_ws>\install\share\.

My proposed solution is either: a. Use rcpputil's path b. Add an #ifdef _WIN32 block which uses the proper backslash

I don't see a maintainer/code owner in the repo so @dirk-thomas @wjwwood if there's no issue I'll open a PR.

wjwwood commented 4 years ago

Probably should use rcpputils. Right now it is blindly concatenating hard coded /'s:

https://github.com/ament/ament_index/blob/1a7345a6e0184009cdf33bee1e54a8e5be6e1468/ament_index_cpp/src/get_package_share_directory.cpp#L27

A pr would be fine.