Commit efa44122 authored by Katsumi Yamaoka's avatar Katsumi Yamaoka

lisp/gnus/mm-decode.el (mm-temp-files-delete): Fix file deletion logic

parent 6bdcbfe1
2013-08-28 Katsumi Yamaoka <yamaoka@jpl.org>
* mm-decode.el (mm-temp-files-delete): Fix file deletion logic.
2013-08-19 Katsumi Yamaoka <yamaoka@jpl.org>
* mm-util.el (mm-coding-system-priorities): Exclude iso-2022-jp-2 and
......
......@@ -607,19 +607,19 @@ files left at the next time."
(split-string (buffer-string) "\n" t))))
fails)
(dolist (temp (append cache mm-temp-files-to-be-deleted))
(unless (and (file-exists-p temp)
(if (file-directory-p temp)
;; A parent directory left at the previous time.
(when (and (file-exists-p temp)
(if (file-directory-p temp)
;; A parent directory left at the previous time.
(progn
(ignore-errors (delete-directory temp))
(file-exists-p temp))
;; Delete a temporary file and its parent directory.
(ignore-errors (delete-file temp))
(or (file-exists-p temp)
(progn
(setq temp (file-name-directory temp))
(ignore-errors (delete-directory temp))
(not (file-exists-p temp)))
;; Delete a temporary file and its parent directory.
(ignore-errors (delete-file temp))
(and (not (file-exists-p temp))
(progn
(setq temp (file-name-directory temp))
(ignore-errors (delete-directory temp))
(not (file-exists-p temp))))))
(file-exists-p temp)))))
(push temp fails)))
(if fails
;; Schedule the deletion of the files left at the next time.
......
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