Bruno Haible <br...@clisp.org> writes: > How does MoveFileEx with MOVEFILE_REPLACE_EXISTING behave when > the destination file exists and is a hard link [1] to another file? Will > the other file see some changes? I.e. will the hard linked file be > overwritten, or will the hard link be broken (as on POSIX systems)?
Michel, is there any chance that you could test this behavior? Now, also, I see that rename() works to rename directories on Windows, but MoveFileEx with MOVEFILE_REPLACE_EXISTING will not rename directories. I guess that perhaps the solution to this is to try MoveFileEx with flags of 0 first, and then try again with MOVEFILE_REPLACE_EXISTING if that reports an error of ERROR_ALREADY_EXISTS or ERROR_FILE_EXISTS (there is no documentation on which one is returned). I'm going away tomorrow morning until March 25, so possibly I'll have to continue this discussion after that. -- "The road to hell is paved with convenient shortcuts." --Peter da Silva