  		if (db_error != 0) {
  			g_warning (G_STRLOC ": db->sync failed with %s", db_strerror (db_error));
  		} else {
-@@ -1061,6 +1070,7 @@
+@@ -1077,6 +1086,7 @@
  #endif
  {
  	g_warning ("libdb error: %s", buf2);

 }
 
 
@@ -1126,6 +1136,7 @@
 
 		global_env.env = env;
 		global_env.ref_count = 1;
+		global_env.had_error = FALSE;
 	}
 	g_static_mutex_unlock(&global_env_lock);
 

Index: addressbook/backends/file/e-book-backend-file.c
===================================================================
--- addressbook/backends/file/e-book-backend-file.c	(revision 38)
+++ addressbook/backends/file/e-book-backend-file.c	(working copy)
@@ -83,6 +83,7 @@
 static struct {
 	volatile int ref_count;
 	DB_ENV *env;
+	gboolean had_error;
 } global_env = { 0, NULL };
 
 static EDataBookStatus
@@ -213,12 +214,16 @@
