Mercurial > emacs
diff lisp/files.el @ 98413:6708b075f931
(locate-dominating-file): Wrap directory-files with condition-case, instead
of calling file-directory-p, which stats the directory one more time.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Tue, 30 Sep 2008 12:51:44 +0000 |
parents | 7c5cb1da6c7f |
children | 2c7f6673441b |
line wrap: on
line diff
--- a/lisp/files.el Tue Sep 30 11:54:57 2008 +0000 +++ b/lisp/files.el Tue Sep 30 12:51:44 2008 +0000 @@ -734,8 +734,9 @@ (let ((prev-user user)) (setq user (nth 2 (file-attributes dir))) (or (null prev-user) (equal user prev-user)))) - (if (setq files (and (file-directory-p dir) - (directory-files dir 'full regexp))) + (if (setq files (condition-case nil + (directory-files dir 'full regexp) + (error nil))) (throw 'found (car files)) (if (equal dir (setq dir (file-name-directory