From 75e84ec74f0eaf6ffd7d865478e170f084f2ff63 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 10 Sep 2002 21:39:56 +0000 Subject: Same as below. Also save errno before closing the file so our caller can 2002-09-10 Jeffrey Stedfast * 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 --- camel/camel-folder-summary.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'camel/camel-folder-summary.c') diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c index 3ec6c93107..4eea17751a 100644 --- a/camel/camel-folder-summary.c +++ b/camel/camel-folder-summary.c @@ -1,3 +1,4 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* * Copyright (C) 2000 Ximian Inc. * @@ -580,7 +581,7 @@ camel_folder_summary_load(CamelFolderSummary *s) CAMEL_SUMMARY_UNLOCK(s, io_lock); - if (fclose(in) == -1) + if (fclose (in) != 0) return -1; s->flags &= ~CAMEL_SUMMARY_DIRTY; -- cgit v1.2.3