As Jeff proposed, change the check to looking for the filename's first character to be a digit
Этот коммит содержится в:
родитель
e33d44a29a
Коммит
92ae386a34
@ -104,6 +104,7 @@
|
|||||||
#ifdef HAVE_DIRENT_H
|
#ifdef HAVE_DIRENT_H
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
#include "opal/mca/hwloc/hwloc.h"
|
#include "opal/mca/hwloc/hwloc.h"
|
||||||
#include "opal/mca/hwloc/base/base.h"
|
#include "opal/mca/hwloc/base/base.h"
|
||||||
@ -371,8 +372,7 @@ static int close_open_file_descriptors(int write_fd,
|
|||||||
}
|
}
|
||||||
struct dirent *files;
|
struct dirent *files;
|
||||||
while (NULL != (files = readdir(dir))) {
|
while (NULL != (files = readdir(dir))) {
|
||||||
if (0 == strncmp(files->d_name,".",1) ||
|
if (!isdigit(files->d_name[0])) {
|
||||||
0 == strncmp(files->d_name,"..",2)) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int fd = strtol(files->d_name, NULL, 10);
|
int fd = strtol(files->d_name, NULL, 10);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user