Fix 'locate-dominating-file' when FILE is not a directory.
* lisp/files.el (locate-dominating-file): Handle FILE that is not a directory. (Bug#66542)
This commit is contained in:
parent
8d2a04f4c0
commit
95d56b92a6
1 changed files with 5 additions and 3 deletions
|
@ -1135,9 +1135,11 @@ the function needs to examine, starting with FILE."
|
|||
(while (not (or root
|
||||
(null file)
|
||||
(string-match locate-dominating-stop-dir-regexp file)))
|
||||
(setq try (if (stringp name)
|
||||
(and (file-directory-p file)
|
||||
(file-exists-p (expand-file-name name file)))
|
||||
(setq file (if (file-directory-p file)
|
||||
file
|
||||
(file-name-directory file))
|
||||
try (if (stringp name)
|
||||
(file-exists-p (expand-file-name name file))
|
||||
(funcall name file)))
|
||||
(cond (try (setq root file))
|
||||
((equal file (setq file (file-name-directory
|
||||
|
|
Loading…
Add table
Reference in a new issue