Changes committed gnus/lisp (ChangeLog mm-decode.el)

"Reiner Steib" <[email protected]>
Newsgroups gmane.emacs.gnus.commits
Message-ID <[email protected]>
Modified: ChangeLog mm-decode.el

(mm-display-external): Make temp file read-only.


Index: ChangeLog
diff -u gnus/lisp/ChangeLog:7.1829 gnus/lisp/ChangeLog:7.1830
--- ChangeLog:7.1829	Sun Apr 13 14:38:38 2008
+++ ChangeLog	Sun Apr 13 22:33:41 2008
@@ -1,3 +1,7 @@
+2008-04-13  Reiner Steib  <[email protected]>
+
+	* mm-decode.el (mm-display-external): Make temp file read-only.
+
 2008-04-11  Reiner Steib  <[email protected]>
 
 	* gnus.el: Bump version to 0.9.
Index: mm-decode.el
diff -u gnus/lisp/mm-decode.el:7.64 gnus/lisp/mm-decode.el:7.65
--- mm-decode.el:7.64	Sun Mar  2 18:07:02 2008
+++ mm-decode.el	Sun Apr 13 22:33:41 2008
@@ -795,7 +795,7 @@
 	       (copiousoutput (assoc "copiousoutput" mime-info))
 	       file buffer)
 	  ;; We create a private sub-directory where we store our files.
-	  (set-file-modes dir 448)
+	  (set-file-modes dir #o700)
 	  (if filename
 	      (setq file (expand-file-name
 			  (gnus-map-function mm-file-name-rewrite-functions
@@ -815,6 +815,10 @@
 					    nil suffix))))
 	  (let ((coding-system-for-write mm-binary-coding-system))
 	    (write-region (point-min) (point-max) file nil 'nomesg))
+	  ;; The file is deleted after the viewer exists.  If the users edits
+	  ;; the file, changes will be lost.  Set file to read-only to make it
+	  ;; clear.
+	  (set-file-modes file #o400)
 	  (message "Viewing with %s" method)
 	  (cond
 	   (needsterm
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.