mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2024-11-26 15:32:05 +00:00
67dc2ae0b2
This PR fixes a readir for posix. readdir is not working correctly in rust. The current WAMR's readdir implementation for posix is, if readdir returns 0, it will exit with an error. But posix readdir returns 0 at the end of the directory. To handle this correctly, if readdir returns 0, it should only raise an error if errno has changed. We can reproduce it with the following rust code: ```rust use std::fs; fn main() { let entries = fs::read_dir(".").unwrap(); for entry in entries { println!("read_dir:{:?}", entry); } } ``` |
||
---|---|---|
.. | ||
coap | ||
mem-alloc | ||
platform | ||
utils |