mirror of
https://github.com/wiiu-env/libfat.git
synced 2024-11-25 03:16:52 +01:00
Don't set errno at the end of a directory if no error occurred
In _FAT_dirnext, which implements a function similar to readdir, don't set errno to ENOENT, because reaching the end of a directory is not an error. This conforms to POSIX readdir and is consistent with _FAT_read not setting errno when reaching EOF.
This commit is contained in:
parent
3fde6ce161
commit
b7c4d38b32
@ -588,7 +588,6 @@ int _FAT_dirnext_r (struct _reent *r, DIR_ITER *dirState, char *filename, struct
|
||||
// Make sure there is another file to report on
|
||||
if (! state->validEntry) {
|
||||
_FAT_unlock(&state->partition->lock);
|
||||
r->_errno = ENOENT;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user