Ensure we don't have a trailing separator on the end of our tmpdir as (a) it really looks weird, and (b) some exotic systems interpret that as indicating the rest of the path is to be treated as absolute. Makes for very strange and interesting behavior...
This commit was SVN r23046.
Этот коммит содержится в:
родитель
55889934d8
Коммит
3434296836
@ -129,6 +129,7 @@ orte_session_dir_get_name(char **fulldirpath,
|
|||||||
*vpidstr = NULL;
|
*vpidstr = NULL;
|
||||||
bool prefix_provided = false;
|
bool prefix_provided = false;
|
||||||
int exit_status = ORTE_SUCCESS;
|
int exit_status = ORTE_SUCCESS;
|
||||||
|
size_t len;
|
||||||
#ifndef __WINDOWS__
|
#ifndef __WINDOWS__
|
||||||
int uid;
|
int uid;
|
||||||
struct passwd *pwdent;
|
struct passwd *pwdent;
|
||||||
@ -295,6 +296,11 @@ orte_session_dir_get_name(char **fulldirpath,
|
|||||||
else { /* General Environment var */
|
else { /* General Environment var */
|
||||||
prefix = strdup(opal_tmp_directory());
|
prefix = strdup(opal_tmp_directory());
|
||||||
}
|
}
|
||||||
|
len = strlen(prefix);
|
||||||
|
/* check for a trailing path separator */
|
||||||
|
if (OPAL_PATH_SEP[0] == prefix[len-1]) {
|
||||||
|
prefix[len-1] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
/* BEFORE doing anything else, check to see if this prefix is
|
/* BEFORE doing anything else, check to see if this prefix is
|
||||||
* allowed by the system
|
* allowed by the system
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user