libroot_build _kern_read_dir(): reset errno before readdir()
Since we're checking errno when readdir() didn't return an entry, we need to reset it before, or we might see a spurious error value.
This commit is contained in:
parent
a196160c9a
commit
75c10de291
@ -609,6 +609,7 @@ _kern_read_dir(int fd, struct dirent *buffer, size_t bufferSize,
|
||||
|
||||
// get the next entry
|
||||
dirent *entry;
|
||||
errno = 0;
|
||||
if (dynamic_cast<AttrDirDescriptor*>(descriptor))
|
||||
entry = fs_read_attr_dir(descriptor->dir);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user