From: Gerd Moellmann Date: Fri, 23 Jun 2000 07:13:08 +0000 (+0000) Subject: (post-mail-send-it): Make sure file has X-Git-Tag: emacs-pretest-21.0.90~3115 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9858013fc8e6909fd88e9d4409a57b7e13396db6;p=emacs.git (post-mail-send-it): Make sure file has proper permissions from birth. --- diff --git a/lisp/mail/mailpost.el b/lisp/mail/mailpost.el index 0d053da6024..f7548a94c05 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