- ;; The agentview file is missing. Perform a brute-force
- ;; reconstruction of its contents.
- (let* (alist
- (file-attributes (directory-files-and-attributes
- (gnus-agent-article-name ""
- gnus-agent-read-agentview) nil "^[0-9]+$" t)))
- (while file-attributes
- (let* ((fa (pop file-attributes))
- (artnum (string-to-number (nth 0 fa)))
- (days (time-to-days (nth 5 fa))))
- (push (cons artnum days) alist)))
- alist)))))
+ ;; The agentview file is missing.
+ (condition-case nil
+ ;; If the agent directory exists, attempt to perform a brute-force
+ ;; reconstruction of its contents.
+ (let* (alist
+ (file-attributes (directory-files-and-attributes
+ (gnus-agent-article-name ""
+ gnus-agent-read-agentview) nil "^[0-9]+$" t)))
+ (while file-attributes
+ (let ((fa (pop file-attributes)))
+ (unless (nth 1 fa)
+ (push (cons (string-to-number (nth 0 fa)) (time-to-days (nth 5 fa))) alist))))
+ alist)
+ (file-error nil))))))