It's the right thing to give an error that some process has the file open but never tell you which process that is?
The underlying behavior is correct though - people with open handles have the priority unless they have explicitly stated that deleting a file while they use it is OK.
[1] https://docs.microsoft.com/en-us/sysinternals/downloads/proc...