Also you may want to write this logic as part of `p_rename` itself (in `posix/win32`) so it affects all other parts of the code that rename files.