1
1

Quick fix: save the errno from the mkdir call as the call to stat will likely overwrite it

Signed-off-by: Ralph Castain <rhc@open-mpi.org>
Этот коммит содержится в:
Ralph Castain 2017-01-18 15:42:31 -08:00
родитель d1880d8ba1
Коммит 6da4dbbb33

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

@ -113,10 +113,11 @@ int opal_os_dirpath_create(const char *path, const mode_t mode)
}
/* Now that we have the name, try to create it */
ret = mkdir(tmp, mode);
mkdir(tmp, mode);
ret = errno; // save the errno for an error msg, if needed
if (0 != stat(tmp, &buf)) {
opal_show_help("help-opal-util.txt", "mkdir-failed", true,
tmp, strerror(errno));
tmp, strerror(ret));
opal_argv_free(parts);
free(tmp);
return OPAL_ERROR;