Commit 6b99fa73 authored by Juanma Barranquero's avatar Juanma Barranquero
Browse files

(vc-find-root): Don't loop forever on non-existent root.

parent 0a0d3143
2008-02-16 Eli Zaretskii <>
* vc-hooks.el (vc-find-root): Don't loop forever on non-existent root.
2008-02-14 Stefan Monnier <monnier@pastel.home>
* textmodes/sgml-mode.el (sgml-mode): Fix comment syntax.
......@@ -316,7 +316,7 @@ The function walks up the directory tree from FILE looking for WITNESS.
If WITNESS if not found, return nil, otherwise return the root."
;; Represent /home/luser/foo as ~/foo so that we don't try to look for
;; witnesses in /home or in /.
(while (not (file-directory-p file))
(while (and (not (file-directory-p file)) (file-exists-p file))
(setq file (file-name-directory (directory-file-name file))))
(setq file (abbreviate-file-name file))
(let ((root nil)
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