]> git.notmuchmail.org Git - notmuch/blobdiff - lib/message.cc
lib: Perform the same transformation to _notmuch_database_filename_to_direntry
[notmuch] / lib / message.cc
index 00754254b87bc387420529a66082a3887ec69a4e..8d552f1fc07d91d03f3fcbf94b49de17fc644581 100644 (file)
@@ -495,9 +495,8 @@ _notmuch_message_add_filename (notmuch_message_t *message,
     if (status)
        return status;
 
     if (status)
        return status;
 
-    status = _notmuch_database_filename_to_direntry (local,
-                                                    message->notmuch,
-                                                    filename, &direntry);
+    status = _notmuch_database_filename_to_direntry (
+       local, message->notmuch, filename, NOTMUCH_FIND_CREATE, &direntry);
     if (status)
        return status;
 
     if (status)
        return status;
 
@@ -541,8 +540,8 @@ _notmuch_message_remove_filename (notmuch_message_t *message,
     notmuch_status_t status;
     Xapian::TermIterator i, last;
 
     notmuch_status_t status;
     Xapian::TermIterator i, last;
 
-    status = _notmuch_database_filename_to_direntry (local, message->notmuch,
-                                                    filename, &direntry);
+    status = _notmuch_database_filename_to_direntry (
+       local, message->notmuch, filename, NOTMUCH_FIND_CREATE, &direntry);
     if (status)
        return status;
 
     if (status)
        return status;