git-svn: trunk@1875
Tomasz Kojm authored on 2006/03/27 04:39:05... | ... |
@@ -199,19 +199,18 @@ int scan(const char *filename, unsigned long int *scanned, const struct cl_node |
199 | 199 |
const char *virname; |
200 | 200 |
|
201 | 201 |
|
202 |
- /* check permissions */ |
|
203 |
- if(access(filename, R_OK)) { |
|
204 |
- mdprintf(odesc, "%s: Access denied. ERROR\n", filename); |
|
205 |
- return -1; |
|
206 |
- } |
|
207 |
- |
|
208 | 202 |
/* stat file */ |
209 |
- |
|
210 | 203 |
if(lstat(filename, &sb) == -1) { |
211 | 204 |
mdprintf(odesc, "%s: lstat() failed. ERROR\n", filename); |
212 | 205 |
return -1; |
213 | 206 |
} |
214 | 207 |
|
208 |
+ /* check permissions */ |
|
209 |
+ if(access(filename, R_OK)) { |
|
210 |
+ mdprintf(odesc, "%s: Access denied. ERROR\n", filename); |
|
211 |
+ return -1; |
|
212 |
+ } |
|
213 |
+ |
|
215 | 214 |
switch(sb.st_mode & S_IFMT) { |
216 | 215 |
case S_IFLNK: |
217 | 216 |
if(!cfgopt(copt, "FollowFileSymlinks")->enabled) |