|
|
|
@ -91,6 +91,7 @@ int treewalk(const char *dirname, struct cl_node *root, const struct passwd *use |
|
|
|
|
return 0; |
|
|
|
|
|
|
|
|
|
claminfo.dirs++; |
|
|
|
|
depth++; |
|
|
|
|
|
|
|
|
|
if((dd = opendir(dirname)) != NULL) { |
|
|
|
|
while((dent = readdir(dd))) { |
|
|
|
@ -106,7 +107,7 @@ int treewalk(const char *dirname, struct cl_node *root, const struct passwd *use |
|
|
|
|
/* stat the file */ |
|
|
|
|
if(lstat(fname, &statbuf) != -1) { |
|
|
|
|
if(S_ISDIR(statbuf.st_mode) && !S_ISLNK(statbuf.st_mode) && recursion) { |
|
|
|
|
if(treewalk(fname, root, user, opt, limits, options, ++depth) == 1) |
|
|
|
|
if(treewalk(fname, root, user, opt, limits, options, depth) == 1) |
|
|
|
|
scanret++; |
|
|
|
|
} else { |
|
|
|
|
if(S_ISREG(statbuf.st_mode)) |
|
|
|
|