Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit 31312e1

Browse files
authored
Merge pull request #1319 from rhc54/cmr20/path
Fix a bug where we were requiring that all paths in $PATH be absolute…
2 parents eedceaf + 3c9684b commit 31312e1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

opal/util/path.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,16 +231,18 @@ char *opal_path_access(char *fname, char *path, int mode)
231231
{
232232
char *fullpath = NULL;
233233
struct stat buf;
234+
bool relative;
234235

235236
/* Allocate space for the full pathname. */
236237
if (NULL == path) {
237238
fullpath = opal_os_path(false, fname, NULL);
238239
} else {
239-
fullpath = opal_os_path(false, path, fname, NULL);
240+
relative = !opal_path_is_absolute(path);
241+
fullpath = opal_os_path(relative, path, fname, NULL);
240242
}
241-
if (NULL == fullpath)
243+
if (NULL == fullpath) {
242244
return NULL;
243-
245+
}
244246
/* first check to see - is this a file or a directory? We
245247
* only want files
246248
*/
@@ -447,7 +449,7 @@ static char *opal_check_mtab(char *dev_path)
447449
*
448450
* @fname[in] File name to check
449451
* @fstype[out] File system type if retval is true
450-
*
452+
*
451453
* @retval true If fname is on NFS, Lustre, Panasas or GPFS
452454
* @retval false otherwise
453455
*

0 commit comments

Comments
 (0)