aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKatsumi Yamaoka2013-08-28 08:38:28 +0000
committerKatsumi Yamaoka2013-08-28 08:38:28 +0000
commitefa44122aa6df377f9165f4bba740714e9f803c4 (patch)
tree2480e64e75993e99c9040994d71f202452b8f310
parent6bdcbfe1e33fa27b7c19042de6b0f69be12aad45 (diff)
downloademacs-efa44122aa6df377f9165f4bba740714e9f803c4.tar.gz
emacs-efa44122aa6df377f9165f4bba740714e9f803c4.zip
lisp/gnus/mm-decode.el (mm-temp-files-delete): Fix file deletion logic
-rw-r--r--lisp/gnus/ChangeLog4
-rw-r--r--lisp/gnus/mm-decode.el22
2 files changed, 15 insertions, 11 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 950b73666e2..c75588536a4 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,7 @@
12013-08-28 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * mm-decode.el (mm-temp-files-delete): Fix file deletion logic.
4
12013-08-19 Katsumi Yamaoka <yamaoka@jpl.org> 52013-08-19 Katsumi Yamaoka <yamaoka@jpl.org>
2 6
3 * mm-util.el (mm-coding-system-priorities): Exclude iso-2022-jp-2 and 7 * mm-util.el (mm-coding-system-priorities): Exclude iso-2022-jp-2 and
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index dbbf0befe60..28d930b55f7 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -607,19 +607,19 @@ files left at the next time."
607 (split-string (buffer-string) "\n" t)))) 607 (split-string (buffer-string) "\n" t))))
608 fails) 608 fails)
609 (dolist (temp (append cache mm-temp-files-to-be-deleted)) 609 (dolist (temp (append cache mm-temp-files-to-be-deleted))
610 (unless (and (file-exists-p temp) 610 (when (and (file-exists-p temp)
611 (if (file-directory-p temp) 611 (if (file-directory-p temp)
612 ;; A parent directory left at the previous time. 612 ;; A parent directory left at the previous time.
613 (progn
614 (ignore-errors (delete-directory temp))
615 (file-exists-p temp))
616 ;; Delete a temporary file and its parent directory.
617 (ignore-errors (delete-file temp))
618 (or (file-exists-p temp)
613 (progn 619 (progn
620 (setq temp (file-name-directory temp))
614 (ignore-errors (delete-directory temp)) 621 (ignore-errors (delete-directory temp))
615 (not (file-exists-p temp))) 622 (file-exists-p temp)))))
616 ;; Delete a temporary file and its parent directory.
617 (ignore-errors (delete-file temp))
618 (and (not (file-exists-p temp))
619 (progn
620 (setq temp (file-name-directory temp))
621 (ignore-errors (delete-directory temp))
622 (not (file-exists-p temp))))))
623 (push temp fails))) 623 (push temp fails)))
624 (if fails 624 (if fails
625 ;; Schedule the deletion of the files left at the next time. 625 ;; Schedule the deletion of the files left at the next time.