diff --git a/library/std/src/sys/pal/mikros/fs.rs b/library/std/src/sys/pal/mikros/fs.rs index 1a83bc0575c..8c12728507e 100644 --- a/library/std/src/sys/pal/mikros/fs.rs +++ b/library/std/src/sys/pal/mikros/fs.rs @@ -289,6 +289,9 @@ fn next(&mut self) -> Option> { Ok(val) => val, Err(e) => return Some(Err(e.into())), }; + if entry_name == ".." || entry_name == "." { + return self.next(); + } let mut entry_path = self.path.clone(); entry_path.push(entry_name); Some(Ok(DirEntry { path: entry_path }))