mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-07-15 08:48:33 +00:00
Fix readdir for posix
This commit is contained in:
parent
e7a8b3e743
commit
9bce0ebcee
|
@ -920,7 +920,11 @@ os_readdir(os_dir_stream dir_stream, __wasi_dirent_t *entry,
|
||||||
|
|
||||||
if (dent == NULL) {
|
if (dent == NULL) {
|
||||||
*d_name = NULL;
|
*d_name = NULL;
|
||||||
return convert_errno(errno);
|
if (errno != 0) {
|
||||||
|
return convert_errno(errno);
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
long offset = (__wasi_dircookie_t)telldir(dir_stream);
|
long offset = (__wasi_dircookie_t)telldir(dir_stream);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user