Add a comment about ReplaceFile API

This commit is contained in:
sramamoorthy 2019-03-18 15:24:08 -07:00
parent c0094830c3
commit fe18596c01
1 changed files with 2 additions and 0 deletions

View File

@ -1667,6 +1667,8 @@ void atomicReplace( std::string const& path, std::string const& content, bool te
if(!f)
throw io_error();
#ifdef _WIN32
// In Windows case, ReplaceFile API is used which preserves the ownership,
// ACLs and other attributes of the original file
#elif defined(__unixish__)
// get the uid/gid/mode bits of old file and set it on new file, else fail
struct stat info;