diff options
author | Lars Magne Ingebrigtsen <larsi@gnus.org> | 1997-09-24 01:50:24 +0000 |
---|---|---|
committer | Lars Magne Ingebrigtsen <larsi@gnus.org> | 1997-09-24 01:50:24 +0000 |
commit | a8151ef7e5caf46b41fc52f8189b07d1fa6c184e (patch) | |
tree | 8eb82a1990da4afe2e247c1397e42a20128f0568 /lisp/gnus/nnml.el | |
parent | 5f016f400343a57d641642ce114f90d3a15082e1 (diff) | |
download | emacs-a8151ef7e5caf46b41fc52f8189b07d1fa6c184e.tar.gz emacs-a8151ef7e5caf46b41fc52f8189b07d1fa6c184e.tar.bz2 emacs-a8151ef7e5caf46b41fc52f8189b07d1fa6c184e.zip |
*** empty log message ***
Diffstat (limited to 'lisp/gnus/nnml.el')
-rw-r--r-- | lisp/gnus/nnml.el | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el index e1986a7ba9d..3cfd12bb374 100644 --- a/lisp/gnus/nnml.el +++ b/lisp/gnus/nnml.el @@ -38,7 +38,7 @@ (nnoo-declare nnml) (defvoo nnml-directory message-directory - "Mail spool directory.") + "Spool directory for the nnml mail backend.") (defvoo nnml-active-file (concat (file-name-as-directory nnml-directory) "active") @@ -474,8 +474,15 @@ all. This may very well take some time.") (defun nnml-article-to-file (article) (nnml-update-file-alist) (let (file) - (when (setq file (cdr (assq article nnml-article-file-alist))) - (concat nnml-current-directory file)))) + (if (setq file (cdr (assq article nnml-article-file-alist))) + (concat nnml-current-directory file) + ;; Just to make sure nothing went wrong when reading over NFS -- + ;; check once more. + (when (file-exists-p + (setq file (concat nnml-current-directory "/" + (number-to-string article)))) + (nnml-update-file-alist t) + file)))) (defun nnml-deletable-article-p (group article) "Say whether ARTICLE in GROUP can be deleted." @@ -769,8 +776,7 @@ all. This may very well take some time.") (search-forward "\n\n" nil t) (setq chars (- (point-max) (point))) (max 1 (1- (point))))) - (when (and (not (= 0 chars)) ; none of them empty files... - (not (= (point-min) (point-max)))) + (unless (zerop (buffer-size)) (goto-char (point-min)) (setq headers (nnml-parse-head chars (caar files))) (save-excursion @@ -800,8 +806,9 @@ all. This may very well take some time.") (setf (car active) num))))))) t)) -(defun nnml-update-file-alist () - (unless nnml-article-file-alist +(defun nnml-update-file-alist (&optional force) + (when (or (not nnml-article-file-alist) + force) (setq nnml-article-file-alist (nnheader-article-to-file-alist nnml-current-directory)))) |