]> git.eshelyaron.com Git - emacs.git/commitdiff
(post-mail-send-it): Make sure file has
authorGerd Moellmann <gerd@gnu.org>
Fri, 23 Jun 2000 07:13:08 +0000 (07:13 +0000)
committerGerd Moellmann <gerd@gnu.org>
Fri, 23 Jun 2000 07:13:08 +0000 (07:13 +0000)
proper permissions from birth.

lisp/mail/mailpost.el

index 0d053da60241f834cad6bf152798372726e23767..f7548a94c05f99853c9f2f1a8f218bd0ffe362cc 100644 (file)
@@ -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