mirror of
https://github.com/wiiu-env/ContentRedirectionModule.git
synced 2024-06-01 23:18:44 +02:00
Hotfix for readdir bug in latest newlib version
This commit is contained in:
parent
96e1fd1747
commit
2c5ef81e82
|
@ -125,8 +125,8 @@ FSError FSWrapper::FSReadDirWrapper(FSDirectoryHandle handle, FSDirectoryEntry *
|
||||||
result = FS_ERROR_OK;
|
result = FS_ERROR_OK;
|
||||||
} else {
|
} else {
|
||||||
auto err = errno;
|
auto err = errno;
|
||||||
if (err != 0) {
|
if (err != 0 && err != 2) { // newlib currently has a bug and doesn't clear errno properly when the end of a dir is reached
|
||||||
DEBUG_FUNCTION_LINE_ERR("[%s] Failed to read dir %08X (handle %08X)", getName().c_str(), dir, handle);
|
DEBUG_FUNCTION_LINE_ERR("[%s] Failed to read dir %08X (handle %08X). errno %d (%s)", getName().c_str(), dir, handle, err, strerror(err));
|
||||||
result = FS_ERROR_MEDIA_ERROR;
|
result = FS_ERROR_MEDIA_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user