From aa49e8de71f7a81b6429d6b2b72edb06dfdb3b14 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Tue, 8 Apr 2003 00:55:02 +0000 Subject: use g_strerror, and use errno directly rather than ferrno(). 2003-04-08 Not Zed * camel-folder-summary.c (camel_folder_summary_load): use g_strerror, and use errno directly rather than ferrno(). (summary_header_load): set errno when we get a version mismatch. svn path=/trunk/; revision=20739 --- 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 a66026f0ab..1552a08ced 100644 --- a/camel/camel-folder-summary.c +++ b/camel/camel-folder-summary.c @@ -589,7 +589,7 @@ camel_folder_summary_load(CamelFolderSummary *s) return 0; error: - g_warning ("Cannot load summary file: %s", strerror (ferror (in))); + g_warning ("Cannot load summary file: `%s': %s", s->summary_path, g_strerror (errno)); CAMEL_SUMMARY_UNLOCK(s, io_lock); fclose (in); s->flags |= ~CAMEL_SUMMARY_DIRTY; @@ -1388,6 +1388,7 @@ summary_header_load(CamelFolderSummary *s, FILE *in) s->saved_count = count; if (s->version != version) { g_warning("Summary header version mismatch"); + errno = EINVAL; return -1; } return 0; -- cgit v1.2.3