git: 067e2e39e84a - main - mail/neomutt: fix appending to mbox files

From: Pietro Cerutti <gahr_at_FreeBSD.org>
Date: Mon, 13 Jan 2025 09:27:25 UTC
The branch main has been updated by gahr:

URL: https://cgit.FreeBSD.org/ports/commit/?id=067e2e39e84a92bd83349c906a58a851ad364130

commit 067e2e39e84a92bd83349c906a58a851ad364130
Author:     Pietro Cerutti <gahr@FreeBSD.org>
AuthorDate: 2025-01-13 09:26:25 +0000
Commit:     Pietro Cerutti <gahr@FreeBSD.org>
CommitDate: 2025-01-13 09:27:23 +0000

    mail/neomutt: fix appending to mbox files
    
    See https://github.com/neomutt/neomutt/issues/4541
---
 mail/neomutt/Makefile                |  1 +
 mail/neomutt/files/patch-mbox_mbox.c | 11 +++++++++++
 2 files changed, 12 insertions(+)

diff --git a/mail/neomutt/Makefile b/mail/neomutt/Makefile
index 5a34bcbc79db..651c2a674976 100644
--- a/mail/neomutt/Makefile
+++ b/mail/neomutt/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	neomutt
 PORTVERSION=	20250109
+PORTREVISION=	1
 CATEGORIES=	mail
 
 MAINTAINER=	gahr@FreeBSD.org
diff --git a/mail/neomutt/files/patch-mbox_mbox.c b/mail/neomutt/files/patch-mbox_mbox.c
new file mode 100644
index 000000000000..8856dbbe0752
--- /dev/null
+++ b/mail/neomutt/files/patch-mbox_mbox.c
@@ -0,0 +1,11 @@
+--- mbox/mbox.c.orig	2025-01-13 09:21:08 UTC
++++ mbox/mbox.c
+@@ -895,7 +895,7 @@ static bool mbox_mbox_open_append(struct Mailbox *m, O
+     }
+     FREE(&tmp_path);
+ 
+-    adata->fp = mutt_file_fopen(mailbox_path(m), (flags & MUTT_NEWFOLDER) ? "w+" : "a+");
++    adata->fp = mutt_file_fopen(mailbox_path(m), "a+");
+     if (!adata->fp)
+     {
+       mutt_perror("%s", mailbox_path(m));