udevtrigger: add back directory name check into scan_subdir
authorGabor Juhos <juhosg@openwrt.org>
Wed, 11 Sep 2013 14:10:12 +0000 (16:10 +0200)
committerJohn Crispin <blogic@openwrt.org>
Fri, 13 Sep 2013 15:36:58 +0000 (17:36 +0200)
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>
udevtrigger.c

index dbb414a..e09ad98 100644 (file)
@@ -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));