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 dbb414ab7d561822b8584baacbe123b17b17e288..e09ad98c6c5f543b7a202509d518a89c2d4c1d95 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));