Commit 9d1fb179 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(normal-top-level-add-subdirs-to-load-path): Avoid doing a `stat' when

it isn't necessary because that can cause trouble when an NFS server is down.
parent 0aeff9e0
...@@ -373,6 +373,10 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." ...@@ -373,6 +373,10 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
(while contents (while contents
(unless (member (car contents) '("." ".." "RCS" "CVS")) (unless (member (car contents) '("." ".." "RCS" "CVS"))
(when (and (string-match "\\`[a-zA-Z0-9]" (car contents)) (when (and (string-match "\\`[a-zA-Z0-9]" (car contents))
;; Avoid doing a `stat' when it isn't necessary
;; because that can cause trouble when an NFS server
;; is down.
(not (string-match "\\.elc?\\'" (car contents)))
(file-directory-p (car contents))) (file-directory-p (car contents)))
(let ((expanded (expand-file-name (car contents)))) (let ((expanded (expand-file-name (car contents))))
(unless (file-exists-p (expand-file-name ".nosearch" (unless (file-exists-p (expand-file-name ".nosearch"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment