X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fbinaries.cc;h=33cde3b74700b4544e5a748e227213d068532189;hb=1d6aaf09ebb2aafad07307f736d7bab6fdb79d2c;hp=00a897660f5dbc2ae421d4f776467441e9a9b20d;hpb=fd632c80c5d393253d394c9a8721339876602882;p=m6w6%2Flibmemcached diff --git a/libtest/binaries.cc b/libtest/binaries.cc index 00a89766..33cde3b7 100644 --- a/libtest/binaries.cc +++ b/libtest/binaries.cc @@ -27,7 +27,16 @@ namespace libtest { bool has_gearmand_binary() { #if defined(HAVE_GEARMAND_BINARY) && HAVE_GEARMAND_BINARY - if (access(GEARMAND_BINARY,R_OK|X_OK) == 0) + std::stringstream arg_buffer; + + if (getenv("PWD")) + { + arg_buffer << getenv("PWD"); + arg_buffer << "/"; + } + arg_buffer << GEARMAND_BINARY; + + if (access(arg_buffer.str().c_str() ,R_OK|X_OK) == 0) { return true; }