]> Cypherpunks repositories - gostls13.git/commit
os: do not skip directory entries with zero inodes on wasip1
authorAchille Roussel <achille.roussel@gmail.com>
Wed, 5 Jul 2023 01:15:58 +0000 (18:15 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 6 Jul 2023 23:23:41 +0000 (23:23 +0000)
commit39c507071251dbf5ea098077ad0e791679dae548
treedf9d399551faf62faa74dadc99d238ed51095db9
parente6ec2a34dc1e1c319588fb0cb449abf55291977f
os: do not skip directory entries with zero inodes on wasip1

When building programs to GOOS=wasip1, the program does not have the
guarantees that the underlying directories will come from a file system
where a zero inode value indicates that the entry was deleted but not
yet removed from the directory. The host runtime may be running on
windows or may be exposing virtual user-space file systems that do not
have the concept of inodes. In those setup, we assume that the host
runtime is in charge of dealing with edge cases such as skipping
directory entries with zero inodes when needed, and the guest
application should trust the list of entries that it sees;
therefore, we disable skipping over zero inodes on wasip1.

Change-Id: I99aa562441cdb4182965f270af054cf3cf7f8f20
Reviewed-on: https://go-review.googlesource.com/c/go/+/507915
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
src/os/dir_darwin.go
src/os/dir_unix.go
src/syscall/dirent.go