There was an error while loading. Please reload this page.
.
..
getdents64
1 parent bf6c718 commit a2a9878Copy full SHA for a2a9878
1 file changed
library/std/src/sys/fs/hermit.rs
@@ -265,6 +265,9 @@ impl Iterator for ReadDir {
265
// d_name is guaranteed to be null-terminated.
266
let name = unsafe { CStr::from_ptr((&raw const (*entry_ptr).d_name).cast()) };
267
let name_bytes = name.to_bytes();
268
+ if name_bytes == b"." || name_bytes == b".." {
269
+ continue;
270
+ }
271
272
return Some(Ok(DirEntry {
273
dir: Arc::clone(&self.inner),
0 commit comments