[evolution-data-server] Bug #728973 - [IMAPX] Recover after store summary version mismatch
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug #728973 - [IMAPX] Recover after store summary version mismatch
- Date: Fri, 9 May 2014 10:40:40 +0000 (UTC)
commit 4b7c3eda7859fb2e7ebb0b27ff3ed4cd5df3de4c
Author: Milan Crha <mcrha redhat com>
Date: Fri May 9 12:39:59 2014 +0200
Bug #728973 - [IMAPX] Recover after store summary version mismatch
camel/camel-store-summary.c | 2 +-
camel/providers/imapx/camel-imapx-store-summary.c | 7 ++-----
camel/providers/imapx/camel-imapx-store.c | 5 ++++-
3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/camel/camel-store-summary.c b/camel/camel-store-summary.c
index 0b8ca60..a73adc8 100644
--- a/camel/camel-store-summary.c
+++ b/camel/camel-store-summary.c
@@ -480,7 +480,7 @@ camel_store_summary_load (CamelStoreSummary *summary)
error:
i = ferror (in);
- g_warning ("Cannot load summary file: %s", g_strerror (ferror (in)));
+ g_warning ("Cannot load summary file '%s': %s", summary->priv->summary_path, i == 0 ? "Unknown error"
: g_strerror (i));
g_rec_mutex_unlock (&summary->priv->io_lock);
fclose (in);
summary->priv->dirty = FALSE;
diff --git a/camel/providers/imapx/camel-imapx-store-summary.c
b/camel/providers/imapx/camel-imapx-store-summary.c
index b14e94b..3465135 100644
--- a/camel/providers/imapx/camel-imapx-store-summary.c
+++ b/camel/providers/imapx/camel-imapx-store-summary.c
@@ -109,11 +109,8 @@ imapx_store_summary_summary_header_load (CamelStoreSummary *summary,
return -1;
if (version < CAMEL_IMAPX_STORE_SUMMARY_VERSION) {
- g_warning (
- "Unable to load store summary: "
- "Expected version (%d), got (%d)",
- CAMEL_IMAPX_STORE_SUMMARY_VERSION,
- version);
+ g_warning ("IMAPx: Unable to load store summary: Expected version (%d), got (%d)",
+ CAMEL_IMAPX_STORE_SUMMARY_VERSION, version);
return -1;
}
diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/providers/imapx/camel-imapx-store.c
index 803d241..9be05e1 100644
--- a/camel/providers/imapx/camel-imapx-store.c
+++ b/camel/providers/imapx/camel-imapx-store.c
@@ -2210,7 +2210,10 @@ imapx_store_initable_init (GInitable *initable,
summary = g_build_filename (user_cache_dir, ".ev-store-summary", NULL);
camel_store_summary_set_filename (imapx_store->summary, summary);
- camel_store_summary_load (imapx_store->summary);
+ if (camel_store_summary_load (imapx_store->summary) == -1) {
+ camel_store_summary_touch (imapx_store->summary);
+ camel_store_summary_save (imapx_store->summary);
+ }
g_free (summary);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]