by waynecochran · 8y ago · 0 comments
https://msdn.microsoft.com/en-us/library/zw5t957f.aspx
"The old name must be the path of an existing
file or directory. The new name must not be
the name of an existing file or directory."
I ended up having to use ReplaceFile and rename if ReplaceFile failed: ReplaceFile(tmpFileName, fileName, NULL,
REPLACEFILE_IGNORE_ACL_ERRORS, NULL, NULL) == 0 &&
rename(tmpFileName, fileName);
https://msdn.microsoft.com/en-us/library/windows/desktop/aa3...Why Windows why?
[1] https://gitlab.com/jeffreyrogers27/AtomicWrite/blob/master/A...
And this might be already the reason. Win32 is geared towards the broad range of developers whereas Unix comes more from systems thinking.