X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fmessage.cc;h=1cda55a1e1b67b9573f7994018cc97bb73d08acc;hp=baeaa46972867d10a1cc5cde801fac03c0817df1;hb=d12801c8b4d04a50fcb912b75017244fb09658e8;hpb=5fe5e802ab3101a375ec1262770955904e169e47 diff --git a/lib/message.cc b/lib/message.cc index baeaa469..1cda55a1 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -416,22 +416,16 @@ _notmuch_message_add_filename (notmuch_message_t *message, return NOTMUCH_STATUS_SUCCESS; } -/* Move the filename from the data field (as it was in database format - * version 0) to a file-direntry term instead (as in database format - * version 1). - */ -void -_notmuch_message_upgrade_filename_storage (notmuch_message_t *message) +char * +_notmuch_message_talloc_copy_data (notmuch_message_t *message) { - char *filename; + return talloc_strdup (message, message->doc.get_data ().c_str ()); +} - filename = talloc_strdup (message, message->doc.get_data ().c_str ()); - if (filename && *filename != '\0') { - _notmuch_message_add_filename (message, filename); - message->doc.set_data (""); - _notmuch_message_sync (message); - } - talloc_free (filename); +void +_notmuch_message_clear_data (notmuch_message_t *message) +{ + message->doc.set_data (""); } const char *