Commit 063ab4b0 authored by Katsumi Yamaoka's avatar Katsumi Yamaoka
Browse files

lisp/gnus/gnus-uu.el: Fix temporary files deletion bug

parent 7e1549c9
2013-12-18 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-uu.el (gnus-uu-decode-binhex, gnus-uu-decode-binhex-view):
Make sure work directory exists.
(gnus-uu-digest-mail-forward): Store temporary files in work directory
rather than tmp directory.
(gnus-summary-prepare-exit-hook): Replace gnus-exit-group-hook, that is
not necessarily always run, with it.
2013-12-18 Jan Tatarik <jan.tatarik@gmail.com>
 
* gnus-icalendar.el (gnus-icalendar-identities): Make changing the
......
......@@ -406,6 +406,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time."
(read-directory-name "Unbinhex and save in dir: "
gnus-uu-default-dir
gnus-uu-default-dir))))
(gnus-uu-initialize)
(setq gnus-uu-binhex-article-name
(mm-make-temp-file (expand-file-name "binhex" gnus-uu-work-dir)))
(gnus-uu-decode-with-method 'gnus-uu-binhex-article n dir))
......@@ -471,6 +472,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time."
(list current-prefix-arg
(read-file-name "Unbinhex, view and save in dir: "
gnus-uu-default-dir gnus-uu-default-dir)))
(gnus-uu-initialize)
(setq gnus-uu-binhex-article-name
(mm-make-temp-file (expand-file-name "binhex" gnus-uu-work-dir)))
(let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic)))
......@@ -482,8 +484,9 @@ didn't work, and overwrite existing files. Otherwise, ask each time."
(defun gnus-uu-digest-mail-forward (&optional n post)
"Digests and forwards all articles in this series."
(interactive "P")
(gnus-uu-initialize)
(let ((gnus-uu-save-in-digest t)
(file (mm-make-temp-file (nnheader-concat gnus-uu-tmp-dir "forward")))
(file (mm-make-temp-file (nnheader-concat gnus-uu-work-dir "forward")))
(message-forward-as-mime message-forward-as-mime)
(mail-parse-charset gnus-newsgroup-charset)
(mail-parse-ignored-charsets gnus-newsgroup-ignored-charsets)
......@@ -1836,8 +1839,8 @@ Gnus might fail to display all of it.")
;; Initializing
(add-hook 'gnus-exit-group-hook 'gnus-uu-clean-up)
(add-hook 'gnus-exit-group-hook 'gnus-uu-delete-work-dir)
(add-hook 'gnus-summary-prepare-exit-hook 'gnus-uu-clean-up)
(add-hook 'gnus-summary-prepare-exit-hook 'gnus-uu-delete-work-dir)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment