Lines 450-455
static void read_repos_conf(const char *configroot, const char *repos_conf)
Link Here
|
450 |
char *top_conf, *sub_conf; |
450 |
char *top_conf, *sub_conf; |
451 |
int i, count; |
451 |
int i, count; |
452 |
struct dirent **confs; |
452 |
struct dirent **confs; |
|
|
453 |
struct stat s; |
453 |
|
454 |
|
454 |
xasprintf(&top_conf, "%s%s", configroot, repos_conf); |
455 |
xasprintf(&top_conf, "%s%s", configroot, repos_conf); |
455 |
count = scandir(top_conf, &confs, NULL, alphasort); |
456 |
count = scandir(top_conf, &confs, NULL, alphasort); |
Lines 460-466
static void read_repos_conf(const char *configroot, const char *repos_conf)
Link Here
|
460 |
for (i = 0; i < count; ++i) { |
461 |
for (i = 0; i < count; ++i) { |
461 |
const char *name = confs[i]->d_name; |
462 |
const char *name = confs[i]->d_name; |
462 |
|
463 |
|
463 |
if (name[0] == '.' || confs[i]->d_type != DT_REG) |
464 |
stat(name, &s); |
|
|
465 |
if (name[0] == '.' || !S_ISREG(s.st_mode)) |
464 |
continue; |
466 |
continue; |
465 |
|
467 |
|
466 |
xasprintf(&sub_conf, "%s/%s", top_conf, name); |
468 |
xasprintf(&sub_conf, "%s/%s", top_conf, name); |
467 |
- |
|
|