projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
qmail plugin: Don't recurse into ".", ".." and other directories beginning with a...
[collectd.git]
/
src
/
qmail.c
diff --git
a/src/qmail.c
b/src/qmail.c
index
1a8e2bd
..
74386c3
100644
(file)
--- a/
src/qmail.c
+++ b/
src/qmail.c
@@
-81,9
+81,12
@@
static int count_files_in_subtree (const char *path, int depth)
count = 0;
while ((de = readdir (dh)) != NULL)
{
count = 0;
while ((de = readdir (dh)) != NULL)
{
- char abs_path[
4096
];
+ char abs_path[
PATH_MAX
];
struct stat statbuf;
struct stat statbuf;
+ if (de->d_name[0] == '.')
+ continue;
+
ssnprintf (abs_path, sizeof (abs_path), "%s/%s", path, de->d_name);
status = lstat (abs_path, &statbuf);
ssnprintf (abs_path, sizeof (abs_path), "%s/%s", path, de->d_name);
status = lstat (abs_path, &statbuf);