Commit ea2db920 authored by Philip Withnall's avatar Philip Withnall

glocalfileoutputstream: Use g_fsync() for platform-independence

Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
parent 3b6460b9
...@@ -313,9 +313,8 @@ _g_local_file_output_stream_really_close (GLocalFileOutputStream *file, ...@@ -313,9 +313,8 @@ _g_local_file_output_stream_really_close (GLocalFileOutputStream *file,
{ {
GLocalFileStat final_stat; GLocalFileStat final_stat;
#ifdef HAVE_FSYNC
if (file->priv->sync_on_close && if (file->priv->sync_on_close &&
fsync (file->priv->fd) != 0) g_fsync (file->priv->fd) != 0)
{ {
int errsv = errno; int errsv = errno;
...@@ -325,8 +324,7 @@ _g_local_file_output_stream_really_close (GLocalFileOutputStream *file, ...@@ -325,8 +324,7 @@ _g_local_file_output_stream_really_close (GLocalFileOutputStream *file,
g_strerror (errsv)); g_strerror (errsv));
goto err_out; goto err_out;
} }
#endif
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
/* Must close before renaming on Windows, so just do the close first /* Must close before renaming on Windows, so just do the close first
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment