Hi Kevin,
I have tested it on macOS 26.4. Bug no longer reproduces with my test samples. Thank you for the fix!
Regarding "fclonefileat" API my expectations are actually met in macOS 26.4 now - I do expect that Kernel is capable of rejecting invalid calls of "clonefile" API and does fail the operation. It is tricky to predict the future as there might be new regular file type that might not be clonable/will become clonable so I always delegate the file clonability decision to Kernel. My userland code is to handle the errors gracefully, although fallback in case of rsrc needs to be reconsidered... It is on my side though, I do not see any further enhancements needed in Kernel currently.
For backwards compatibility, I will include explicit careful checks for resource forks and paths with "..namedfork/" as you have suggested.
I appreciate your help!
Topic:
App & System Services
SubTopic:
Core OS
Tags: