---
notmuch-new.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/notmuch-new.c b/notmuch-new.c
index 4075d395..95ca9971 100644
--- a/notmuch-new.c
+++ b/notmuch-new.c
@@ -939,11 +939,8 @@ remove_filename (notmuch_database_t *notmuch,
status = notmuch_database_begin_atomic (notmuch);
if (status)
return status;
- status = notmuch_database_find_message_by_filename (notmuch, path, &message);
- if (status || message == NULL)
- goto DONE;
- status = notmuch_database_remove_message (notmuch, path);
+ status = notmuch_database_remove_filename (notmuch, path, &message);
if (status == NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID) {
add_files_state->renamed_messages++;
if (add_files_state->synchronize_flags == true)
@@ -954,7 +951,6 @@ remove_filename (notmuch_database_t *notmuch,
}
notmuch_message_destroy (message);
- DONE:
notmuch_database_end_atomic (notmuch);
return status;
}
--
2.27.0
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org