From fe87137541a4f8763d19ad6eefcc09c18d55e63b Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sun, 25 Jul 2004 14:59:19 +0000 Subject: [PATCH] Make un_attach skip arcmail --- lib/attach.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/attach.c b/lib/attach.c index 8cf5c13e..3c96fb4c 100644 --- a/lib/attach.c +++ b/lib/attach.c @@ -227,7 +227,21 @@ int check_flo(faddr *node, char *filename, char flavor, int fdn) */ void un_attach(faddr *node, char *filename, int fdn) { + char *base, *allname; + Syslog('p', "un_attach: %s %s %s", ascfnode(node, 0x1f), filename, fdn ?"FDN":"NOR"); + allname = xstrcpy(filename); + base = basename(allname); + + if ((strlen(base) == 12) && ((strncasecmp(base+8,".su",3) == 0) || + (strncasecmp(base+8,".mo",3) == 0) || (strncasecmp(base+8,".tu",3) == 0) || + (strncasecmp(base+8,".we",3) == 0) || (strncasecmp(base+8,".th",3) == 0) || + (strncasecmp(base+8,".fr",3) == 0) || (strncasecmp(base+8,".sa",3) == 0))) { + Syslog('p', "this is arcmail, no un_attach"); + free(allname); + return; + } + free(allname); if (check_flo(node, filename, 'h', fdn) == 0) if (check_flo(node, filename, 'f', fdn) == 0)