[evolution-couchdb] Resurrect old cache creation code for e-d-s < 2.31.0



commit 2618ff788e73dfae6eb65911d26ce156991088fc
Author: Rodrigo Moya <rodrigo gnome-db org>
Date:   Thu Apr 14 16:22:20 2011 +0200

    Resurrect old cache creation code for e-d-s < 2.31.0

 addressbook/e-book-backend-couchdb.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/e-book-backend-couchdb.c b/addressbook/e-book-backend-couchdb.c
index 033c1b8..735cade 100644
--- a/addressbook/e-book-backend-couchdb.c
+++ b/addressbook/e-book-backend-couchdb.c
@@ -1101,6 +1101,7 @@ e_book_backend_couchdb_load_source (EBookBackend *backend,
 	}
 
 	/* Create cache */
+#if EDS_CHECK_VERSION(2, 31, 0)
 	cache_dir = e_book_backend_get_cache_dir (E_BOOK_BACKEND (couchdb_backend));
 	cache_filename = g_build_filename (cache_dir,
 					   couchdb_session_get_uri (couchdb_backend->couchdb),
@@ -1108,6 +1109,11 @@ e_book_backend_couchdb_load_source (EBookBackend *backend,
 	g_debug ("Creating cache at %s", cache_filename);
 	couchdb_backend->cache = e_book_backend_cache_new ((const gchar *) cache_filename);
 	g_free (cache_filename);
+#else
+	cache_dir = e_source_get_uri (source);
+	couchdb_backend->cache = e_book_backend_cache_new ((const gchar *) cache_dir);
+	g_free (cache_dir);
+#endif
 
 	/* Populate the cache */
 	e_file_cache_clean (E_FILE_CACHE (couchdb_backend->cache));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]