libkernel: unlink and rmdir of a path ending in "." or ".." fail with EPERM or ENOTEMPTY instead of EINVAL #8796
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-21T00:56:53Z.
Windows host,
diran existing directory:unlink("dir/."),unlink("dir/.."),sceKernelUnlink("dir/.")andunlinkat(dirfd, ".", 0)return EPERM;rmdir("dir/..")andsceKernelRmdir("dir/..")return ENOTEMPTY.Expected (FreeBSD 11.4
lookup(), sys/kern/vfs_lookup.c:750-754 and 823-826: "." or ".." as the last component of a DELETE lookup): EINVAL (22), asrename(#8174) andrmdir(".")already answer.Test:
core/libs/tests/GuestFilesystem.cpp,core/libs/tests/GuestKernelSys.cpp(new cases; the existingunlinkat(base, ".", 0) == EPERMexpectation changes to EINVAL).Fix branch: https://github.com/xXPBSXx/AnyPS5/tree/fix/unlink-rmdir-dot-component
AI-assisted (Claude Code).