unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Cc: David Bremner <david@tethera.net>
Subject: [PATCH 2/2] WIP: use new API in notmuch-new
Date: Fri, 31 Jul 2020 07:33:13 -0300	[thread overview]
Message-ID: <20200731103313.1460011-3-david@tethera.net> (raw)
In-Reply-To: <20200731103313.1460011-1-david@tethera.net>

---
 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

      parent reply	other threads:[~2020-07-31 10:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-31 10:33 Request for testing: incremental improvement in move / rename handling David Bremner
2020-07-31 10:33 ` [PATCH 1/2] WIP: provide alternate API for n_d_remove_message David Bremner
2020-07-31 10:33 ` David Bremner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200731103313.1460011-3-david@tethera.net \
    --to=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).