+2002-01-11 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * 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 <yoichi@eken.phys.nagoya-u.ac.jp>
* elmo-util.el (elmo-file-cache-delete): Return t if a cache file
(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."