So I’m using the TemporaryFile class and overwriteTargetFileWithTemporary() is failing on Windows (it’s fine on MacOS)… so it looks like to get File::replaceInternal() to return true I had to change it to:
bool File::replaceInternal (const File& dest) const
{
void* lpExclude = 0;
void* lpReserved = 0;
return ReplaceFile (dest.getFullPathName().toWideCharPointer(), fullPath.toWideCharPointer(),
0, REPLACEFILE_IGNORE_MERGE_ERRORS | REPLACEFILE_IGNORE_ACL_ERRORS, lpExclude, lpReserved) != 0;
}
I added the REPLACEFILE_IGNORE_ACL_ERRORS flag.
Rail