From: hmurata Date: Fri, 11 Jan 2002 15:39:45 +0000 (+0000) Subject: * elmo-util.el (elmo-file-cache-delete): Fixed last change; X-Git-Tag: wl-2_9_5~16 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fadc43c5b36588c8869d501deee5b39b9b228885;p=elisp%2Fwanderlust.git * elmo-util.el (elmo-file-cache-delete): Fixed last change; Return t if PATH is directory, too. Use `dolist' instead of while loop. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 161e5d3..9303ba4 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,9 @@ +2002-01-11 Hiroya Murata + + * elmo-util.el (elmo-file-cache-delete): Fixed last change; + Return t if PATH is directory, too. + Use `dolist' instead of while loop. + 2002-01-11 Yoichi NAKAYAMA * elmo-util.el (elmo-file-cache-delete): Return t if a cache file diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index dcdbd5c..835bf4b 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -1569,16 +1569,14 @@ SECTION is the section string." (defun elmo-file-cache-delete (path) "Delete a cache on PATH." - (let (files) - (when (file-exists-p path) - (if (file-directory-p path) - (progn - (setq files (directory-files path t "^[^\\.]")) - (while files - (delete-file (car files)) - (setq files (cdr files))) - (delete-directory path)) - (progn (delete-file path) t))))) + (when (file-exists-p path) + (if (file-directory-p path) + (progn + (dolist (file (directory-files path t "^[^\\.]")) + (delete-file file)) + (delete-directory path)) + (delete-file path)) + t)) (defun elmo-file-cache-exists-p (msgid) "Returns 'section or 'entire if a cache which corresponds to MSGID exists."