diff options
author | Edward Hervey <bilboed@bilboed.com> | 2009-12-18 16:45:46 +0100 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2009-12-29 15:00:30 +0100 |
commit | 27eb18db2a4ad53b872d568cebf16e2d202bfb46 (patch) | |
tree | 5c66861763fe6eb2ef60c74d180b600ffd68b53e | |
parent | 9898014a70a3471f576f4ba061aec37a86bba1fa (diff) |
30-gfileutils.patch
-rw-r--r-- | glib/gfileutils.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/glib/gfileutils.c b/glib/gfileutils.c index 76335fa47..3a35d595e 100644 --- a/glib/gfileutils.c +++ b/glib/gfileutils.c @@ -996,7 +996,14 @@ write_to_temp_file (const gchar *contents, #endif errno = 0; +#ifdef MAEMO_CHANGES + /* introduce a write-barrier for file contents before close()/rename() + * to work around file systems with writeback behaviour like UBIFS. + */ + if (fdatasync (fileno (file)) < 0 || fclose (file) == EOF) +#else /* !MAEMO_CHANGES */ if (fclose (file) == EOF) +#endif /* MAEMO_CHANGES */ { save_errno = errno; |