On Tue Jul 26 15:35:09 2022 +0000, Esme Povirk wrote:
I had an important realization about the directory check. If the source filename ends with a backslash, the MoveFileW call will only succeed if the source file is a directory. That should remove the need to check beforehand and eliminate the time-of-check to time-of-use problem. It does still require remapping some error codes. I get `ERROR_FILE_NOT_FOUND` if it doesn't exist and `ERROR_INVALID_NAME` if it's a regular file. But I think it'd be an improvement overall.
Hi Esme, I have pushed new MR where I add a backslash as suggested by you. Please have a look. Thanks, Robert