aboutsummaryrefslogtreecommitdiffstats
path: root/storage_xml.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-04-14 00:35:55 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2010-04-14 00:35:55 +0200
commit542e44ac43d901c9ad70b7f89dde47eff4d9d8db (patch)
tree2aeeb651865729c5091ea8319c2f43845c5b6ee8 /storage_xml.c
parent3d1481f0c57ade74fb1d888bce8ce4e8e17bc269 (diff)
fsync() the user configuration file before closing it. (Bug #559)
Diffstat (limited to 'storage_xml.c')
-rw-r--r--storage_xml.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/storage_xml.c b/storage_xml.c
index b6745c75..8c524ca9 100644
--- a/storage_xml.c
+++ b/storage_xml.c
@@ -495,6 +495,7 @@ static storage_status_t xml_save( irc_t *irc, int overwrite )
if( !xml_printf( fd, 0, "</user>\n" ) )
goto write_error;
+ fsync( fd );
close( fd );
path2 = g_strndup( path, strlen( path ) - 1 );