Skip to content

Commit

Permalink
Merge pull request #2 from krabicezpapundeklu/develop
Browse files Browse the repository at this point in the history
Fix extension adding in "search_path" (Windows)
  • Loading branch information
klemens-morgenstern committed Apr 5, 2017
2 parents 04063ee + 1ac2267 commit d5d2c7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/boost/process/detail/windows/search_path.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ inline boost::filesystem::path search_path(
{
for (const boost::filesystem::path & pp : path)
{
auto p = pp / filename;
auto full = pp / filename;
std::array<std::string, 4> extensions {{ "", ".exe", ".com", ".bat" }};
for (boost::filesystem::path ext : extensions)
{
auto p = full;
p += ext;
boost::system::error_code ec;
bool file = boost::filesystem::is_regular_file(p, ec);
Expand Down

0 comments on commit d5d2c7b

Please sign in to comment.