diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-09-11 05:39:56 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-09-11 05:39:56 +0800 |
commit | 75e84ec74f0eaf6ffd7d865478e170f084f2ff63 (patch) | |
tree | d9698160e23dc0ba86157301e67f77c458d43214 /camel/camel-certdb.c | |
parent | fbb7f7c202c6c4f8b435702ababe36463132292c (diff) | |
download | gsoc2013-evolution-75e84ec74f0eaf6ffd7d865478e170f084f2ff63.tar.gz gsoc2013-evolution-75e84ec74f0eaf6ffd7d865478e170f084f2ff63.tar.zst gsoc2013-evolution-75e84ec74f0eaf6ffd7d865478e170f084f2ff63.zip |
Same as below. Also save errno before closing the file so our caller can
2002-09-10 Jeffrey Stedfast <fejj@ximian.com>
* camel-store-summary.c (camel_store_summary_load): Same as
below. Also save errno before closing the file so our caller can
figure out why we failed.
(camel_store_summary_save): Same here, but also flush the output
stream to disk.
* camel-folder-summary.c (camel_folder_summary_load): s/fclose(in)
== -1/fclose(in) != 0/ since fclose doesn't necessarily return -1
on fail, all we really know is that it returns 0 on success and
non-zero on fail.
* camel-certdb.c (camel_certdb_save): fsync() the stream after we
fflush it.
svn path=/trunk/; revision=18037
Diffstat (limited to 'camel/camel-certdb.c')
-rw-r--r-- | camel/camel-certdb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/camel/camel-certdb.c b/camel/camel-certdb.c index 6b6b6c3d67..14020fec16 100644 --- a/camel/camel-certdb.c +++ b/camel/camel-certdb.c @@ -372,7 +372,7 @@ camel_certdb_save (CamelCertDB *certdb) CAMEL_CERTDB_UNLOCK (certdb, io_lock); - if (fflush (out) != 0) { + if (fflush (out) != 0 || fsync (fileno (out)) == -1) { i = errno; fclose (out); unlink (filename); |