diff options
author | Roy Marples <roy@marples.name> | 2007-10-08 12:46:14 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-10-08 12:46:14 +0000 |
commit | 3da29223584b1a336be6ba6c257f748196146a9d (patch) | |
tree | c77bf3370c8fc7fd91dcc0fb02a86f6ca8205e6c /src | |
parent | cd4bce7e8da691b8be0a88292eee13852b826b7e (diff) |
Don't stop reading dir contents on errors
Diffstat (limited to 'src')
-rw-r--r-- | src/librc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/librc.c b/src/librc.c index 3138efc3..43809e2a 100644 --- a/src/librc.c +++ b/src/librc.c @@ -54,8 +54,7 @@ static char **ls_dir (const char *dir, int options) if ((dp = opendir (dir)) == NULL) return (NULL); - errno = 0; - while (((d = readdir (dp)) != NULL) && errno == 0) { + while (((d = readdir (dp)) != NULL)) { if (d->d_name[0] != '.') { if (options & LS_INITD) { int l = strlen (d->d_name); |