From 7e5eae9fb53e0b47d0988984638a77636fe444fd Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Thu, 12 Dec 2024 16:42:21 +0100 Subject: only add "S" flag to existing mail --- src/cmd/show.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cmd/show.rs b/src/cmd/show.rs index 442eb21..b100d25 100644 --- a/src/cmd/show.rs +++ b/src/cmd/show.rs @@ -11,9 +11,8 @@ pub fn show( if let Some(path) = ms.maildir_path.read().unwrap().clone() { let md = open_submaildir(path, &folder); - md.add_flags(&mid, "S").map_err(varlink::map_context!())?; - if let Some(mut mail) = md.find(&mid) { + md.add_flags(&mid, "S").map_err(varlink::map_context!())?; let mail2 = parsed_mail_to_mail(mail.parsed().unwrap()).unwrap(); call.reply(mail2) -- cgit v1.2.3