X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fdirectory.cc;h=4fcb017712f6c9c505a35326dc807f84b3e09d6d;hp=a19f7779881d8ff0b8da9c2b02a2a2645568facb;hb=b22386f353fb30a0d6ccffb32b7339d69f12b85f;hpb=92d8eae8f182e4eebc87d76f8d4f37e6c018883a diff --git a/lib/directory.cc b/lib/directory.cc index a19f7779..4fcb0177 100644 --- a/lib/directory.cc +++ b/lib/directory.cc @@ -103,7 +103,7 @@ _notmuch_directory_create (notmuch_database_t *notmuch, notmuch_directory_t *directory; notmuch_private_status_t private_status; const char *db_path; - notmuch_bool_t create = (flags & NOTMUCH_FIND_CREATE); + bool create = (flags & NOTMUCH_FIND_CREATE); if (! (notmuch->features & NOTMUCH_FEATURE_DIRECTORY_DOCS)) { *status_ret = NOTMUCH_STATUS_UPGRADE_REQUIRED; @@ -189,7 +189,7 @@ _notmuch_directory_create (notmuch_database_t *notmuch, _notmuch_database_log (notmuch, "A Xapian exception occurred creating a directory: %s.\n", error.get_msg().c_str()); - notmuch->exception_reported = TRUE; + notmuch->exception_reported = true; notmuch_directory_destroy (directory); directory = NULL; *status_ret = NOTMUCH_STATUS_XAPIAN_EXCEPTION; @@ -227,11 +227,14 @@ notmuch_directory_set_mtime (notmuch_directory_t *directory, Xapian::sortable_serialise (mtime)); db->replace_document (directory->document_id, directory->doc); + + directory->mtime = mtime; + } catch (const Xapian::Error &error) { _notmuch_database_log (notmuch, "A Xapian exception occurred setting directory mtime: %s.\n", error.get_msg().c_str()); - notmuch->exception_reported = TRUE; + notmuch->exception_reported = true; return NOTMUCH_STATUS_XAPIAN_EXCEPTION; } @@ -298,7 +301,7 @@ notmuch_directory_delete (notmuch_directory_t *directory) _notmuch_database_log (directory->notmuch, "A Xapian exception occurred deleting directory entry: %s.\n", error.get_msg().c_str()); - directory->notmuch->exception_reported = TRUE; + directory->notmuch->exception_reported = true; status = NOTMUCH_STATUS_XAPIAN_EXCEPTION; } notmuch_directory_destroy (directory);