Commit a03c5807 authored by Eli Zaretskii's avatar Eli Zaretskii

(locate-dominating-file): Wrap directory-files with condition-case, instead

of calling file-directory-p, which stats the directory one more time.
parent f45de83b
2008-09-30 Eli Zaretskii <eliz@gnu.org>
* files.el (locate-dominating-file): Wrap directory-files with
condition-case, instead of calling file-directory-p, which stats
the directory one more time.
* mail/mail-utils.el (mail-unquote-printable-region): Use
insert-byte instead of insert-char, when the UNIBYTE arg is
non-nil.
......
......@@ -734,8 +734,9 @@ PATH-AND-SUFFIXES is a pair of lists, (DIRECTORIES . SUFFIXES)."
(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
......
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