emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114040: lisp/gnus/mm-decode.el (mm-temp-files-delet


From: Katsumi Yamaoka
Subject: [Emacs-diffs] trunk r114040: lisp/gnus/mm-decode.el (mm-temp-files-delete): Fix file deletion logic
Date: Wed, 28 Aug 2013 08:39:34 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114040
revision-id: address@hidden
parent: address@hidden
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Wed 2013-08-28 08:38:28 +0000
message:
  lisp/gnus/mm-decode.el (mm-temp-files-delete): Fix file deletion logic
modified:
  lisp/gnus/ChangeLog            changelog-20091113204419-o5vbwnq5f7feedwu-1433
  lisp/gnus/mm-decode.el         
mmdecode.el-20091113204419-o5vbwnq5f7feedwu-1971
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2013-08-19 05:10:33 +0000
+++ b/lisp/gnus/ChangeLog       2013-08-28 08:38:28 +0000
@@ -1,3 +1,7 @@
+2013-08-28  Katsumi Yamaoka  <address@hidden>
+
+       * mm-decode.el (mm-temp-files-delete): Fix file deletion logic.
+
 2013-08-19  Katsumi Yamaoka  <address@hidden>
 
        * mm-util.el (mm-coding-system-priorities): Exclude iso-2022-jp-2 and

=== modified file 'lisp/gnus/mm-decode.el'
--- a/lisp/gnus/mm-decode.el    2013-08-12 05:59:47 +0000
+++ b/lisp/gnus/mm-decode.el    2013-08-28 08:38:28 +0000
@@ -607,19 +607,19 @@
                    (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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]