git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1465 77e5149b-7576-45b1-b177-96237e5ba77b
Tomasz Kojm authored on 2005/04/08 03:33:38... | ... |
@@ -91,6 +91,7 @@ int treewalk(const char *dirname, struct cl_node *root, const struct passwd *use |
91 | 91 |
return 0; |
92 | 92 |
|
93 | 93 |
claminfo.dirs++; |
94 |
+ depth++; |
|
94 | 95 |
|
95 | 96 |
if((dd = opendir(dirname)) != NULL) { |
96 | 97 |
while((dent = readdir(dd))) { |
... | ... |
@@ -106,7 +107,7 @@ int treewalk(const char *dirname, struct cl_node *root, const struct passwd *use |
106 | 106 |
/* stat the file */ |
107 | 107 |
if(lstat(fname, &statbuf) != -1) { |
108 | 108 |
if(S_ISDIR(statbuf.st_mode) && !S_ISLNK(statbuf.st_mode) && recursion) { |
109 |
- if(treewalk(fname, root, user, opt, limits, options, ++depth) == 1) |
|
109 |
+ if(treewalk(fname, root, user, opt, limits, options, depth) == 1) |
|
110 | 110 |
scanret++; |
111 | 111 |
} else { |
112 | 112 |
if(S_ISREG(statbuf.st_mode)) |