diff options
author | 2015-05-16 15:19:09 +0200 | |
---|---|---|
committer | 2015-08-21 17:27:52 +0200 | |
commit | ed16dbb0ed1d54d520bb3eebfc9285a0b23da122 (patch) | |
tree | cc2b780f655012f66e3fe506a2612202903fe6d6 | |
parent | 65d5e4a67366217fa8ccb18302f01a9148c40ac3 (diff) | |
download | paludis-ed16dbb0ed1d54d520bb3eebfc9285a0b23da122.tar.gz paludis-ed16dbb0ed1d54d520bb3eebfc9285a0b23da122.tar.xz |
Fix cave-executables for cross
Change-Id: I3ab85c7e0c31a7792909e111e7bbe042fad589b7
Reviewed-on: https://galileo.mailstation.de/gerrit/1896
Reviewed-by: Kylie McClain <somasis@exherbo.org>
Reviewed-by: Bo Ørsted Andresen <zlin@exherbo.org>
-rw-r--r-- | src/clients/cave/executables_common.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/clients/cave/executables_common.cc b/src/clients/cave/executables_common.cc index 47891c16c..699397bd4 100644 --- a/src/clients/cave/executables_common.cc +++ b/src/clients/cave/executables_common.cc @@ -124,8 +124,13 @@ paludis::cave::executables_common( throw BeMoreSpecific(spec, entries); const std::string path(getenv_or_error("PATH")); + std::set<std::string> raw_paths; + tokenise<delim_kind::AnyOfTag, delim_mode::DelimiterTag>(path, ":", "", std::inserter(raw_paths, raw_paths.begin())); + std::set<std::string> paths; - tokenise<delim_kind::AnyOfTag, delim_mode::DelimiterTag>(path, ":", "", std::inserter(paths, paths.begin())); + for (const std::string& raw_path : raw_paths) + paths.insert(stringify(FSPath(raw_path).realpath_if_exists())); + ExecutablesDisplayer ed(paths, displayer); for (auto i(best ? entries->last() : entries->begin()), i_end(entries->end()) ; |