On Windows allow or the separators to be / or \.
As we return the basename there is no need to call make_friendly. This commit was SVN r13256.
Этот коммит содержится в:
родитель
1e38810c2d
Коммит
0993ffa645
@ -121,12 +121,21 @@ char *opal_basename(const char *filename)
|
||||
/* Look for the final sep */
|
||||
|
||||
ret = strrchr(tmp, sep);
|
||||
#ifdef __WINDOWS__
|
||||
/**
|
||||
* As on Windows we support both separators (/ and \) we should double
|
||||
* check or both of them.
|
||||
*/
|
||||
if( NULL == ret ) {
|
||||
ret = strrchr(tmp, '/');
|
||||
}
|
||||
#endif /* __WINDOWS__ */
|
||||
if (NULL == ret) {
|
||||
return tmp;
|
||||
}
|
||||
ret = strdup(ret + 1);
|
||||
free(tmp);
|
||||
return opal_make_filename_os_friendly(ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
char* opal_dirname(const char* filename)
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user