X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fdirectory.cc;h=5d673e2134d058b8010d96d9783d187e765b96a0;hp=bb6314ad7610b992726c8396251df1b64fa32606;hb=98845fdbb2a4acaa0036f8e2e998e726b18e6b13;hpb=ccf2e0cc4211c276da1db43cdca7ee11018c391d diff --git a/lib/directory.cc b/lib/directory.cc index bb6314ad..5d673e21 100644 --- a/lib/directory.cc +++ b/lib/directory.cc @@ -79,7 +79,7 @@ _notmuch_filenames_create (void *ctx, } notmuch_bool_t -notmuch_filenames_has_more (notmuch_filenames_t *filenames) +notmuch_filenames_valid (notmuch_filenames_t *filenames) { if (filenames == NULL) return NULL; @@ -105,7 +105,7 @@ notmuch_filenames_get (notmuch_filenames_t *filenames) } void -notmuch_filenames_advance (notmuch_filenames_t *filenames) +notmuch_filenames_move_to_next (notmuch_filenames_t *filenames) { if (filenames == NULL) return; @@ -231,7 +231,8 @@ _notmuch_directory_create (notmuch_database_t *notmuch, directory->doc.add_value (NOTMUCH_VALUE_TIMESTAMP, Xapian::sortable_serialise (0)); - directory->document_id = db->add_document (directory->doc); + directory->document_id = _notmuch_database_generate_doc_id (notmuch); + db->replace_document (directory->document_id, directory->doc); talloc_free (local); }