1
1

Fix a bug where we were requiring that all paths in $PATH be absolute. Some users provide relative paths in their environment, and we should respect those.

Этот коммит содержится в:
Ralph Castain 2016-08-12 11:28:57 -07:00
родитель 163999bce0
Коммит 0e58609327

Просмотреть файл

@ -231,16 +231,18 @@ char *opal_path_access(char *fname, char *path, int mode)
{
char *fullpath = NULL;
struct stat buf;
bool relative;
/* Allocate space for the full pathname. */
if (NULL == path) {
fullpath = opal_os_path(false, fname, NULL);
} else {
fullpath = opal_os_path(false, path, fname, NULL);
relative = !opal_path_is_absolute(path);
fullpath = opal_os_path(relative, path, fname, NULL);
}
if (NULL == fullpath)
if (NULL == fullpath) {
return NULL;
}
/* first check to see - is this a file or a directory? We
* only want files
*/