www/hypermail: customize email file format

Update the patch allowing to customize file names to also cover email text
This commit is contained in:
Baptiste Daroussin 2021-07-06 14:40:32 +02:00
parent 847b37d8e8
commit 8094daae8a
2 changed files with 14 additions and 1 deletions

View file

@ -3,7 +3,7 @@
PORTNAME= hypermail
PORTVERSION= 2.4.0
DISTVERSIONPREFIX= v
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= www mail
MAINTAINER= bapt@FreeBSD.org

View file

@ -11,6 +11,19 @@ index cdfa67f..d35d187 100644
return buffer;
#ifdef HAVE_LIBFNV
}
diff --git src/parse.c src/parse.c
index 36da5df..77b173d 100644
--- src/parse.c
+++ src/parse.c
@@ -1481,7 +1481,7 @@ static void write_txt_file(struct emailinfo *emp, struct Push *raw_text_buf)
char *txt_filename;
char *p = PUSH_STRING(*raw_text_buf);
char tmp_buf[32];
- sprintf(tmp_buf, "%.4d", emp->msgnum);
+ sprintf (tmp_buf, set_message_pattern ? set_message_pattern : "%.4d" , emp->msgnum);
txt_filename = htmlfilename(tmp_buf, emp, set_txtsuffix);
if ((!emp->is_deleted
|| ((emp->is_deleted & (FILTERED_DELETE | FILTERED_OLD | FILTERED_NEW
diff --git src/setup.c src/setup.c
index 3735391..0289a20 100644
--- src/setup.c