]> git.notmuchmail.org Git - notmuch/blobdiff - database.cc
notmuch_database_close: Explicitly flush the Xapian database.
[notmuch] / database.cc
index ad91a7d72c8c3521c9e6588c1914af331b8ddd01..8d477eca069abb7e3d1619d5881d3b3ad8d44469 100644 (file)
@@ -166,6 +166,8 @@ notmuch_status_to_string (notmuch_status_t status)
        return "Erroneous NULL pointer";
     case NOTMUCH_STATUS_TAG_TOO_LONG:
        return "Tag value is too long (exceeds NOTMUCH_TAG_MAX)";
+    case NOTMUCH_STATUS_UNBALANCED_FREEZE_THAW:
+       return "Unblanced number of calls to notmuch_message_freeze/thaw";
     default:
     case NOTMUCH_STATUS_LAST_STATUS:
        return "Unknown error status value";
@@ -503,6 +505,8 @@ notmuch_database_open (const char *path)
 void
 notmuch_database_close (notmuch_database_t *notmuch)
 {
+    notmuch->xapian_db->flush ();
+
     delete notmuch->query_parser;
     delete notmuch->xapian_db;
     talloc_free (notmuch);