On Fri, Jan 14, 2005 at 03:41:51PM +0000, Angus Leeming wrote: > Angus Leeming wrote: > > Specifically, I suspect that something is going wrong with getEnvPath > > which attempts to create a vector of paths from $PATH > > "/foo/bar:/usr/bin". > > > // 2. exe must be the name of the binary only and it > > // can be found on the PATH. > > string const exe_name = OnlyFilename(exe_path); > > if (exe_name != exe_path) > > return string(); > > > > std::vector<string> const path = getEnvPath("PATH"); > > std::vector<string>::const_iterator it = path.begin(); > > std::vector<string>::const_iterator const end = path.end(); > > for (; it != end; ++it) { > > This logic is wrong, isn't it? There's nothing to prevent a PATH element > from being a relative path.
Indeed. Especially '.' is found in $PATH sometimes.. Andre'