2001-08-30 11:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Thu, 30 Aug 2001 18:53:23 +0000 (18:53 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Thu, 30 Aug 2001 18:53:23 +0000 (18:53 +0000)
* nnml.el (nnml-check-directory-twice): Remove.
(nnml-retrieve-headers): Ditto.
(nnml-article-to-file): Use nnheader-directory-files-is-safe.

2001-08-30  Andrew Innes  <andrewi@gnu.org>

* nnheader.el (nnheader-directory-files-is-safe): No need to read
directory twice on Windows, or on GNU Emacs-21.

lisp/ChangeLog
lisp/nnheader.el
lisp/nnml.el

index 0402e1f..b8d0840 100644 (file)
@@ -1,3 +1,14 @@
+2001-08-30 11:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * nnml.el (nnml-check-directory-twice): Remove.
+       (nnml-retrieve-headers): Ditto.
+       (nnml-article-to-file): Use nnheader-directory-files-is-safe.
+
+2001-08-30  Andrew Innes  <andrewi@gnu.org>
+
+       * nnheader.el (nnheader-directory-files-is-safe): No need to read
+       directory twice on Windows, or on GNU Emacs-21.
+
 2001-08-30  Andrew Innes  <andrewi@gnu.org>
 
        * nnml.el (nnml-request-article): Use nnml-article-to-file-alist.
index 08e96c0..b68ca94 100644 (file)
@@ -606,7 +606,10 @@ the line could be found."
     (string-match nnheader-numerical-short-files file)
     (string-to-int (match-string 0 file))))
 
-(defvar nnheader-directory-files-is-safe nil
+(defvar nnheader-directory-files-is-safe
+  (or (eq system-type 'windows-nt)
+      (and (not (featurep 'xemacs))
+          (> emacs-major-version 20)))
   "If non-nil, Gnus believes `directory-files' is safe.
 It has been reported numerous times that `directory-files' fails with
 an alarming frequency on NFS mounted file systems. If it is nil,
index d89967e..0201c9f 100644 (file)
@@ -114,9 +114,6 @@ This variable is a virtual server slot.  See the Gnus manual for details.")
 (defvoo nnml-generate-active-function 'nnml-generate-active-info)
 
 (defvar nnml-nov-buffer-file-name nil)
-(defvar nnml-check-directory-twice t
-  "If t, to make sure nothing went wrong when reading over NFS --
-check twice.")
 
 (defvoo nnml-file-coding-system nnmail-file-coding-system)
 
@@ -137,12 +134,7 @@ check twice.")
             (number (length sequence))
             (count 0)
             (file-name-coding-system nnmail-pathname-coding-system)
-            beg article
-            (nnml-check-directory-twice
-             (and nnml-check-directory-twice
-                  ;; To speed up, disable it in some case.
-                  (or (not (numberp nnmail-large-newsgroup))
-                      (<= number nnmail-large-newsgroup)))))
+            beg article)
        (if (stringp (car sequence))
            'headers
          (if (nnml-retrieve-headers-with-nov sequence fetch-old)
@@ -533,8 +525,8 @@ check twice.")
   (let (file)
     (if (setq file (cdr (assq article nnml-article-file-alist)))
        (expand-file-name file nnml-current-directory)
-      (if nnml-check-directory-twice
-      ;; Just to make sure nothing went wrong when reading over NFS --
+      (if (not nnheader-directory-files-is-safe)
+         ;; Just to make sure nothing went wrong when reading over NFS --
          ;; check once more.
          (when (file-exists-p
                 (setq file (expand-file-name (number-to-string article)