From: Juanma Barranquero Date: Sat, 16 Feb 2008 18:16:55 +0000 (+0000) Subject: (vc-find-root): Don't loop forever on non-existent root. X-Git-Tag: emacs-pretest-22.1.91~17 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6b99fa736f1b3e2b66cad76ba4ce8408969d8814;p=emacs.git (vc-find-root): Don't loop forever on non-existent root. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a92d8d16c73..ccf112e0da6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2008-02-16 Eli Zaretskii + + * vc-hooks.el (vc-find-root): Don't loop forever on non-existent root. + 2008-02-14 Stefan Monnier * textmodes/sgml-mode.el (sgml-mode): Fix comment syntax. diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 64a7d8f527a..38ad7b5ea83 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -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)