Wladimir J. van der Laan
11 years ago
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
1 changed files with
3 additions and
2 deletions
-
src/util.cpp
|
|
@ -1101,9 +1101,10 @@ bool RenameOver(boost::filesystem::path src, boost::filesystem::path dest) |
|
|
|
|
|
|
|
void FileCommit(FILE *fileout) |
|
|
|
{ |
|
|
|
fflush(fileout); // harmless if redundantly called
|
|
|
|
fflush(fileout); // harmless if redundantly called
|
|
|
|
#ifdef WIN32 |
|
|
|
_commit(_fileno(fileout)); |
|
|
|
HANDLE hFile = (HANDLE)_get_osfhandle(_fileno(fileout)); |
|
|
|
FlushFileBuffers(hFile); |
|
|
|
#else |
|
|
|
#if defined(__linux__) || defined(__NetBSD__) |
|
|
|
fdatasync(fileno(fileout)); |
|
|
|