Mercurial > emacs
changeset 29886:3baeb77c0e39
(post-mail-send-it): Make sure file has
proper permissions from birth.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Fri, 23 Jun 2000 07:13:08 +0000 |
parents | abd1315edfaf |
children | 8eac40773c01 |
files | lisp/mail/mailpost.el |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mail/mailpost.el Fri Jun 23 07:06:02 2000 +0000 +++ b/lisp/mail/mailpost.el Fri Jun 23 07:13:08 2000 +0000 @@ -28,7 +28,7 @@ (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 @@ (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