changeset 80128:09cc362bbcf4

(vc-find-root): Don't loop forever on non-existent root.
author Juanma Barranquero <lekktu@gmail.com>
date Sat, 16 Feb 2008 18:15:50 +0000
parents 4cab21eb920b
children 8f987c9a6a6e
files lisp/vc-hooks.el
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/vc-hooks.el	Fri Feb 15 23:28:03 2008 +0000
+++ b/lisp/vc-hooks.el	Sat Feb 16 18:15:50 2008 +0000
@@ -316,7 +316,7 @@
 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)