Bug 575555 – Use fsync() when replacing files to avoid data loss on
authorAlexander Larsson <alexl@redhat.com>
Mon, 16 Mar 2009 16:03:13 +0000 (16:03 +0000)
committerAlexander Larsson <alexl@src.gnome.org>
Mon, 16 Mar 2009 16:03:13 +0000 (16:03 +0000)
commit6cff88ba18b3bc0d118308f109840cb163dcea03
tree5998029493148e4e3a31892c3b2f8c3a7883a8b2
parent0b66e52e0b0fbd0101bfbf0e1ef04421d8d7d189
Bug 575555 – Use fsync() when replacing files to avoid data loss on

2009-03-16  Alexander Larsson  <alexl@redhat.com>

Bug 575555 – Use fsync() when replacing files to avoid data loss on crash

        * configure.in:
Look for fsync().

        * glib/gfileutils.c:
        (write_to_temp_file):
fsync temp file if destination file exists

2009-03-16  Alexander Larsson  <alexl@redhat.com>

Bug 575555 – Use fsync() when replacing files to avoid data loss on crash

        * glocalfileoutputstream.c:
        (g_local_file_output_stream_close):
        (_g_local_file_output_stream_replace):
fsync temp file before closing if replacing target file

svn path=/trunk/; revision=7991
ChangeLog
configure.in
gio/ChangeLog
gio/glocalfileoutputstream.c
glib/gfileutils.c