Cleanup removed only the three directories, so a run that stopped between
creating the symbolic link and removing it left the link behind and every later
run failed at its creation with EEXIST. Cleanup now also removes the plain file
and the link, and the link name and plain file name moved to namespace scope.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Rename of file/. fails with ENOTDIR and of loop/. with ELOOP on Linux, where
status() of the parent reports the error instead of "not found"; the test also
runs the file case on Windows, where it passes with and without the change.
The loop case needs a symbolic link and runs on Linux only.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
rename and sceKernelRename resolved "dir/." to "dir" and renamed the directory. FreeBSD 11.4's lookup fails a last component of "." for DELETE and RENAME with EINVAL, for the source and the destination alike. Check the guest string before it is resolved: a last component of "." (also under trailing slashes) fails with EINVAL when its parent exists, ENOENT when it does not and ENOTDIR when it is not a directory.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>