]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-find-root): Don't loop forever on non-existent root.
authorJuanma Barranquero <lekktu@gmail.com>
Sat, 16 Feb 2008 18:16:55 +0000 (18:16 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Sat, 16 Feb 2008 18:16:55 +0000 (18:16 +0000)
lisp/ChangeLog
lisp/vc-hooks.el

index a92d8d16c735b126344bbd2bbf7faaf70d19eba6..ccf112e0da6ec67a73792d5dd6facdb5c4d4475a 100644 (file)
@@ -1,3 +1,7 @@
+2008-02-16  Eli Zaretskii  <eliz@gnu.org>
+
+       * 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.
index 64a7d8f527a57cd1e4bfcd68093c4488032cd478..38ad7b5ea8313ee018317ad45c0a28930bd51dd7 100644 (file)
@@ -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)