FileTarget *VirtualFileSystem::find_binary(const string &name)
{
SearchPath path;
- if(const char *env_path = getenv("PATH"))
+ if(FS::Path(name).is_absolute())
+ path.push_back("/");
+ else if(const char *env_path = getenv("PATH"))
{
vector<string> parts = split(env_path, ':');
for(vector<string>::const_iterator i=parts.begin(); i!=parts.end(); ++i)