Commit Graph
1 Commits
Author SHA1 Message Date
dantdmdarealguy 059bf32d64 fix(libkernel): leave out directory entries removed while getdents lists them on Windows
The Windows directory snapshot lstats every entry it lists, and since
#8520 an entry that was removed before its lstat made the whole
getdents, getdirentries or readdir fail with ENOENT. FreeBSD getdents
does not fail when an entry is removed during the read; the entry is
listed or not. Load now leaves out an entry whose lstat reports ENOENT.

stat and lstat open the file after _wstat64. A file whose delete is
pending until the deleting handle closes fails that open with
ERROR_ACCESS_DENIED and STATUS_DELETE_PENDING, and returned EACCES; it
now returns ENOENT, as _wstat64 already does for such a file.

guest_filesystem lists the working directory the parallel libkernel
tests delete their temporary directories in, and aborted on Windows CI
at its getdents of ".". guest_directory_removed_entries holds a file in
a pending delete and removes files while getdents reads the directory.
2026-10-27 18:26:39 -05:00