summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-09-11 16:10:12 +0200
committerJohn Crispin <blogic@openwrt.org>2013-09-13 17:36:58 +0200
commit66deb81240d58400bd73e031357ec3d859892353 (patch)
treecd5ef524cff5e0a37015fea58b386a009f250169
parent6053eeb3d904516da7e8bcda314f6a37a604f024 (diff)
downloadunitd-66deb81240d58400bd73e031357ec3d859892353.tar
unitd-66deb81240d58400bd73e031357ec3d859892353.zip
udevtrigger: add back directory name check into scan_subdir
It has been accidentally removed by: commit 824a4b3da2c0be19ccf54a48dcd4c10677b82c1a Author: Gabor Juhos <juhosg@openwrt.org> Date: Tue Sep 10 12:59:25 2013 +0200 udevtrigger: reduce indent level in scan_* functions Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
-rw-r--r--udevtrigger.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/udevtrigger.c b/udevtrigger.c
index dbb414a..e09ad98 100644
--- a/udevtrigger.c
+++ b/udevtrigger.c
@@ -191,6 +191,9 @@ static void scan_subdir(const char *base)
for (dent = readdir(dir); dent != NULL; dent = readdir(dir)) {
char dirname[PATH_SIZE];
+ if (dent->d_name[0] == '.')
+ continue;
+
strlcpy(dirname, base, sizeof(dirname));
strlcat(dirname, "/", sizeof(dirname));
strlcat(dirname, dent->d_name, sizeof(dirname));