From: David Levine Date: Sun, 28 Apr 2013 17:49:44 +0000 (-0500) Subject: Allow -clobber with mhstore -outfile. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/c3bcb67006e022443a1a424cb8f76c98e809050d?hp=4ea717b986c4b0ce9ccd01687c7b50bd2ab227ca Allow -clobber with mhstore -outfile. --- diff --git a/man/mhstore.man b/man/mhstore.man index d39994ef..f205482a 100644 --- a/man/mhstore.man +++ b/man/mhstore.man @@ -157,8 +157,8 @@ the current working directory is used. .PP If the .B \-outfile -switch is given, its argument is used for the filename to store the -content, with \*(lq-\*(rq indicating standard output. If the +switch is given, its argument is used for the filename to store all +of the content, with \*(lq-\*(rq indicating standard output. If the .B \-auto switch is given, then .B mhstore @@ -341,12 +341,6 @@ terminal, .I ask behaves the same as .IR always . -.PP -The -.B \-clobber -switch is ignored if the -.B \-outfile -switch is used. .SS "Reassembling Messages of Type message/partial" .B mhstore is also able to reassemble messages that have been diff --git a/uip/mhstoresbr.c b/uip/mhstoresbr.c index fab16800..9efc732c 100644 --- a/uip/mhstoresbr.c +++ b/uip/mhstoresbr.c @@ -607,7 +607,13 @@ store_content (CT ct, CT p) if ((ct->c_storage = clobber_check (add (buffer, NULL))) == NULL) { return NOTOK; } - } /* else output filename was explicitly specified, so use it */ + } else { + /* The output filename was explicitly specified, so use it. */ + if ((ct->c_storage = clobber_check (add (ct->c_storage, NULL))) == + NULL) { + return NOTOK; + } + } got_filename: /* flush the output stream */