]> granicus.if.org Git - file/commitdiff
ignore files that start with '.'
authorChristos Zoulas <christos@zoulas.com>
Fri, 17 Feb 2017 17:34:43 +0000 (17:34 +0000)
committerChristos Zoulas <christos@zoulas.com>
Fri, 17 Feb 2017 17:34:43 +0000 (17:34 +0000)
src/apprentice.c

index 9262ff3d973e9c8c926b984feacd42e1bba8a141..04c4153954a606b67e14b72ca1d109fbc11141dc 100644 (file)
@@ -32,7 +32,7 @@
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: apprentice.c,v 1.258 2017/02/10 18:14:01 christos Exp $")
+FILE_RCSID("@(#)$File: apprentice.c,v 1.259 2017/02/17 17:34:43 christos Exp $")
 #endif /* lint */
 
 #include "magic.h"
@@ -1316,6 +1316,8 @@ apprentice_load(struct magic_set *ms, const char *fn, int action)
                        goto out;
                }
                while ((d = readdir(dir)) != NULL) {
+                       if (d->d_name[0] == '.')
+                               continue;
                        if (asprintf(&mfn, "%s/%s", fn, d->d_name) < 0) {
                                file_oomem(ms,
                                    strlen(fn) + strlen(d->d_name) + 2);