summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2014-05-05 20:50:51 -0700
committerGlenn Morris <rgm@gnu.org>2014-05-05 20:50:51 -0700
commit088e020172e7cdbf75a94ab13a147ff9bb1dd7b4 (patch)
tree253a81e0c93c7243d9aca2fa55b2a13bda9d6d50
parentbf67c3f7ef0260eaf31ec301f8ba3c87809bd076 (diff)
downloademacs-088e020172e7cdbf75a94ab13a147ff9bb1dd7b4.tar.gz
* gnus-fun.el (gnus-grab-cam-face): Do not use predictable temp-file name.
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/gnus-fun.el9
2 files changed, 10 insertions, 4 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 00dbf131880..5c490c4b07a 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
+2014-05-06 Glenn Morris <rgm@gnu.org>
+
+ * gnus-fun.el (gnus-grab-cam-face):
+ Do not use predictable temp-file name. (http://bugs.debian.org/747100)
+
2014-05-01 Glenn Morris <rgm@gnu.org>
* gnus-registry.el (gnus-registry-install-p): Doc fix.
diff --git a/lisp/gnus/gnus-fun.el b/lisp/gnus/gnus-fun.el
index 50076821a8d..28c6a4d3312 100644
--- a/lisp/gnus/gnus-fun.el
+++ b/lisp/gnus/gnus-fun.el
@@ -250,20 +250,21 @@ colors of the displayed X-Faces."
(interactive)
(shell-command "xawtv-remote snap ppm")
(let ((file nil)
+ (tempfile (make-temp-file "gnus-face-" nil ".ppm"))
result)
(while (null (setq file (directory-files "/tftpboot/sparky/tmp"
t "snap.*ppm")))
(sleep-for 1))
(setq file (car file))
(shell-command
- (format "pnmcut -left 110 -top 30 -width 144 -height 144 '%s' | pnmscale -width 48 -height 48 | ppmtopgm > /tmp/gnus.face.ppm"
- file))
+ (format "pnmcut -left 110 -top 30 -width 144 -height 144 '%s' | pnmscale -width 48 -height 48 | ppmtopgm >> %s"
+ file tempfile))
(let ((gnus-convert-image-to-face-command
(format "cat '%%s' | ppmquant %%d | ppmchange %s | pnmtopng"
(gnus-fun-ppm-change-string))))
- (setq result (gnus-face-from-file "/tmp/gnus.face.ppm")))
+ (setq result (gnus-face-from-file tempfile)))
(delete-file file)
- ;;(delete-file "/tmp/gnus.face.ppm")
+ ;;(delete-file tempfile) ; FIXME why are we not deleting it?!
result))
(defun gnus-fun-ppm-change-string ()