summaryrefslogtreecommitdiffstats
path: root/patches/cbenchsuite-1.0/0002-module_manager-Ignore-hidden-directories-as-well.patch
blob: 6765f8fcdf37053b5a483659b575ab548f76bcd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Markus Pargmann <mpa@devmp.org>
Date: Wed, 3 Jun 2015 11:06:54 +0200
Subject: [PATCH] module_manager: Ignore hidden directories as well

Signed-off-by: Markus Pargmann <mpa@devmp.org>
---
 src/core/module_manager.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/core/module_manager.c b/src/core/module_manager.c
index 3f30042d22f1..2ced58c37ed1 100644
--- a/src/core/module_manager.c
+++ b/src/core/module_manager.c
@@ -217,7 +217,9 @@ int mod_mgr_init(struct mod_mgr *mm, const char *mod_dir)
 				continue;
 			}
 		}
-		if (!strcmp(de->d_name, ".") || !strcmp(de->d_name, ".."))
+
+		/* Ignore fake directories and hidden files */
+		if (de->d_name[0] == '.')
 			continue;
 
 		mod = module_create(de->d_name, mod_dir);