aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/mail
diff options
context:
space:
mode:
authorGerd Moellmann <[email protected]>2000-06-23 07:13:08 +0000
committerGerd Moellmann <[email protected]>2000-06-23 07:13:08 +0000
commit9858013fc8e6909fd88e9d4409a57b7e13396db6 (patch)
tree5dedea17eadcfb6ed028e24f76b4e73753012da2 /lisp/mail
parent78c56e706293a2a91660def4cab1f842b083e29a (diff)
(post-mail-send-it): Make sure file has
proper permissions from birth.
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/mailpost.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/mail/mailpost.el b/lisp/mail/mailpost.el
index 0d053da602..f7548a94c0 100644
--- a/lisp/mail/mailpost.el
+++ b/lisp/mail/mailpost.el
@@ -28,7 +28,7 @@ site-init."
(let ((errbuf (if mail-interactive
(generate-new-buffer " post-mail errors")
0))
- (temfile (make-temp-file ",rpost"))
+ temfile
(tembuf (generate-new-buffer " post-mail temp"))
(case-fold-search nil)
delimline
@@ -74,8 +74,12 @@ site-init."
(save-excursion
(set-buffer errbuf)
(erase-buffer))))
- (set-file-modes temfile 384)
- (write-file temfile)
+ (let ((m (default-file-modes)))
+ (unwind-protect
+ (progn
+ (set-default-file-modes 384)
+ (setq temfile (make-temp-file ",rpost")))
+ (set-default-file-modes m)))
(apply 'call-process
(append (list (if (boundp 'post-mail-program)
post-mail-program