commit:     69286497c1b4c8559c638228bb2c9f4359a9c94d
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  1 10:21:59 2018 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Apr  1 10:21:59 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=69286497

read_repos_conf: exclude empty strings as file too

 main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/main.c b/main.c
index 023b42e..4f9f467 100644
--- a/main.c
+++ b/main.c
@@ -516,11 +516,11 @@ read_repos_conf(const char *configroot, const char 
*repos_conf)
                for (i = 0; i < count; ++i) {
                        const char *name = confs[i]->d_name;
 
-                       if (name[0] == '.')
+                       if (name[0] == '.' || name[0] == '\0')
                                continue;
 
                        /* Exclude backup files (aka files with ~ as postfix). 
*/
-                       if (name[0] != '\0' && name[strlen(name) - 1] == '~')
+                       if (name[strlen(name) - 1] == '~')
                                continue;
 
 #ifdef DT_UNKNOWN

Reply via email to