]> diplodocus.org Git - nmh/commitdiff
Removed remaining TMP relics missed with commit
authorDavid Levine <levinedl@acm.org>
Sun, 16 Feb 2014 20:12:15 +0000 (14:12 -0600)
committerDavid Levine <levinedl@acm.org>
Sun, 16 Feb 2014 20:12:15 +0000 (14:12 -0600)
d046c8f0992fddcd69f2172a6607a14dec3b1251.  Also, have mhmail clean
up a .orig tmp file, now that it always uses mhbuild.

man/mh-profile.man
uip/mhmail

index 14d1c5a..901d69f 100644 (file)
@@ -1,4 +1,4 @@
-.TH MH-PROFILE %manext5% "April 14, 2013" "%nmhversion%"
+.TH MH-PROFILE %manext5% "February 16, 2014" "%nmhversion%"
 .\"
 .\" %nmhwarning%
 .\"
@@ -859,7 +859,6 @@ default.  See mh-tailor(5).
 .PP
 .B $MHTMPDIR
 .B $TMPDIR
-.B $TMP
 .RS 5
 These variables are searched, in order, for the directory in which to
 create some temporary files.
index a0baf2e..92bf2db 100755 (executable)
@@ -204,15 +204,18 @@ if [ "$headerfieldlist" ]; then
   header="$header$headerfieldlist"
 fi
 
-#### Set up a file to supply as a draft to post/send.  And set a
-#### trap to remove it.  send moves the file to a backup, so it will
-#### remove that, too.
+#### Set up a file to supply as a draft to post/send.  And set a trap
+#### to remove it.  send moves the file to a backup and can create a
+#### .orig file, so it will remove them, too.
 umask 077
-tmpdir="${MHTMPDIR:-${TMPDIR:-${TMP:-`$nmhbindir/mhpath +`}}}"
+tmpdir="${MHTMPDIR:-${TMPDIR:-`$nmhbindir/mhpath +`}}"
 tmpfile="$tmpdir/mhmail$$"
-tmpfilebackup="'$tmpdir'/,mhmail$$ '$tmpdir'/#mhmail$$"
+backup_char=`"$nmhbindir"/mhparam sbackup`
+tmpfilebackup="'$tmpdir'/${backup_char}mhmail$$*"
 tmpfileresent=
 
+trap "rm -f '$tmpfile' $tmpfilebackup ${tmpfileresent:+'$tmpfileresent'}" 0
+
 message_file=
 if [ $resent -eq 0 ]; then
   #### Add blank line after header if not resending.
@@ -235,8 +238,6 @@ else
   fi
 fi
 
-trap "rm -f '$tmpfile' $tmpfilebackup ${tmpfileresent:+'$tmpfileresent'}" 0
-
 if [ "$body"x = x ]; then
   #### First put message header in the file.
   printf %s "$header" >"$tmpfile" || exit 2