1 |
commit: 69286497c1b4c8559c638228bb2c9f4359a9c94d |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 1 10:21:59 2018 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 1 10:21:59 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=69286497 |
7 |
|
8 |
read_repos_conf: exclude empty strings as file too |
9 |
|
10 |
main.c | 4 ++-- |
11 |
1 file changed, 2 insertions(+), 2 deletions(-) |
12 |
|
13 |
diff --git a/main.c b/main.c |
14 |
index 023b42e..4f9f467 100644 |
15 |
--- a/main.c |
16 |
+++ b/main.c |
17 |
@@ -516,11 +516,11 @@ read_repos_conf(const char *configroot, const char *repos_conf) |
18 |
for (i = 0; i < count; ++i) { |
19 |
const char *name = confs[i]->d_name; |
20 |
|
21 |
- if (name[0] == '.') |
22 |
+ if (name[0] == '.' || name[0] == '\0') |
23 |
continue; |
24 |
|
25 |
/* Exclude backup files (aka files with ~ as postfix). */ |
26 |
- if (name[0] != '\0' && name[strlen(name) - 1] == '~') |
27 |
+ if (name[strlen(name) - 1] == '~') |
28 |
continue; |
29 |
|
30 |
#ifdef DT_UNKNOWN |