diff options
| -rw-r--r-- | lisp/gnus/gnus-agent.el | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index 19d05120045..6426d825465 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el | |||
| @@ -3553,32 +3553,13 @@ articles in every agentized group? ")) | |||
| 3553 | (when (and to-remove | 3553 | (when (and to-remove |
| 3554 | (or gnus-expert-user | 3554 | (or gnus-expert-user |
| 3555 | (gnus-y-or-n-p | 3555 | (gnus-y-or-n-p |
| 3556 | "gnus-agent-expire has identified local directories that are\ | 3556 | "gnus-agent-expire has identified local directories that are |
| 3557 | not currently required by any agentized group. Do you wish to consider\ | 3557 | not currently required by any agentized group. Do you wish to consider |
| 3558 | deleting them?"))) | 3558 | deleting them?"))) |
| 3559 | (while to-remove | 3559 | (dolist (dir to-remove) |
| 3560 | (let ((dir (pop to-remove))) | 3560 | (when (or gnus-expert-user |
| 3561 | (if (or gnus-expert-user | ||
| 3562 | (gnus-y-or-n-p (format "Delete %s? " dir))) | 3561 | (gnus-y-or-n-p (format "Delete %s? " dir))) |
| 3563 | (let* (delete-recursive | 3562 | (delete-directory dir t))))))) |
| 3564 | files f | ||
| 3565 | (delete-recursive | ||
| 3566 | (lambda (f-or-d) | ||
| 3567 | (ignore-errors | ||
| 3568 | (if (file-directory-p f-or-d) | ||
| 3569 | (condition-case nil | ||
| 3570 | (delete-directory f-or-d) | ||
| 3571 | (file-error | ||
| 3572 | (setq files (directory-files f-or-d)) | ||
| 3573 | (while files | ||
| 3574 | (setq f (pop files)) | ||
| 3575 | (or (member f '("." "..")) | ||
| 3576 | (funcall delete-recursive | ||
| 3577 | (nnheader-concat | ||
| 3578 | f-or-d f)))) | ||
| 3579 | (delete-directory f-or-d))) | ||
| 3580 | (delete-file f-or-d)))))) | ||
| 3581 | (funcall delete-recursive dir))))))))) | ||
| 3582 | 3563 | ||
| 3583 | ;;;###autoload | 3564 | ;;;###autoload |
| 3584 | (defun gnus-agent-batch () | 3565 | (defun gnus-agent-batch () |