fscrawl.c: moved errno reset and don't call perror on EACCES.
This commit is contained in:
parent
63b4beb8b0
commit
c1963d1397
1 changed files with 5 additions and 5 deletions
|
|
@ -152,8 +152,8 @@ fs_entry* fsc_read(fscrawl_t f) {
|
||||||
if (f->ent.dir)
|
if (f->ent.dir)
|
||||||
mvdown(f, f->ent.name);
|
mvdown(f, f->ent.name);
|
||||||
|
|
||||||
|
errno = 0;
|
||||||
for(;;) {
|
for(;;) {
|
||||||
|
|
||||||
ent = readdir(f->dirs[f->depth]);
|
ent = readdir(f->dirs[f->depth]);
|
||||||
|
|
||||||
if (ent) {
|
if (ent) {
|
||||||
|
|
@ -163,8 +163,8 @@ fs_entry* fsc_read(fscrawl_t f) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (errno) {
|
if (errno) {
|
||||||
|
if (errno != EACCES)
|
||||||
perror("fsc_read");
|
perror("fsc_read");
|
||||||
errno = 0;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue