]> git.notmuchmail.org Git - notmuch/blobdiff - lib/database.cc
Tighten up a memory allocation.
[notmuch] / lib / database.cc
index 293d21aa01ff70c03ecdcbe3221c92dca21247f5..289e41c45bb4d8607fa0c1b31e31fa355bd21d40 100644 (file)
@@ -688,8 +688,6 @@ notmuch_database_open (const char *path,
        notmuch = NULL;
     }
 
-    notmuch_database_set_maildir_sync (notmuch, FALSE);
-
   DONE:
     if (notmuch_path)
        free (notmuch_path);
@@ -719,13 +717,6 @@ notmuch_database_close (notmuch_database_t *notmuch)
     talloc_free (notmuch);
 }
 
-void
-notmuch_database_set_maildir_sync (notmuch_database_t *database,
-                                  notmuch_bool_t maildir_sync)
-{
-    database->maildir_sync = maildir_sync;
-}
-
 const char *
 notmuch_database_get_path (notmuch_database_t *notmuch)
 {
@@ -1651,13 +1642,6 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
 
        _notmuch_message_add_filename (message, filename);
 
-       /* This is a new message or it has a new filename and as such,
-        * its tags in database either do not exists or might be out
-        * of date. We assign the tags later in notmuch new, but until
-        * then we should not synchronize the tags back to the maildir
-        * flags (if notmuch is configured to do so). */
-       notmuch_message_set_flag(message, NOTMUCH_MESSAGE_FLAG_TAGS_INVALID, TRUE);
-
        /* Is this a newly created message object? */
        if (private_status == NOTMUCH_PRIVATE_STATUS_NO_DOCUMENT_FOUND) {
            _notmuch_message_add_term (message, "type", "mail");
@@ -1726,7 +1710,7 @@ notmuch_database_remove_message (notmuch_database_t *notmuch,
        if (status)
            return status;
 
-       term = talloc_asprintf (notmuch, "%s%s", prefix, direntry);
+       term = talloc_asprintf (local, "%s%s", prefix, direntry);
 
        find_doc_ids_for_term (notmuch, term, &i, &end);