guest_directory_close expected ENOTDIR from getdents on a descriptor number
reused by a regular file, and guest_directory_buffer expected ENOTDIR for
descriptor -1. kern_getdirentries returns EINVAL for a vnode that is not a
directory and getvnode returns EBADF for a descriptor that is not open, which
is what sceKernelGetdirentries now reports on Windows.
Written with AI assistance (Claude).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>