Browse Source

wasi: allow zero inodes when reading directories

Signed-off-by: Achille Roussel <achille.roussel@gmail.com>
pull/3745/head
Achille Roussel 1 year ago
committed by Ron Evans
parent
commit
46d2696363
  1. 3
      src/os/dir_wasi.go

3
src/os/dir_wasi.go

@ -53,9 +53,6 @@ func (f *File) readdir(n int, mode readdirMode) (names []string, dirents []DirEn
if dirent == nil { // EOF if dirent == nil { // EOF
break break
} }
if dirent.Ino == 0 {
continue
}
name := dirent.Name() name := dirent.Name()
// Check for useless names before allocating a string. // Check for useless names before allocating a string.
if string(name) == "." || string(name) == ".." { if string(name) == "." || string(name) == ".." {

Loading…
Cancel
Save