summaryrefslogtreecommitdiff
path: root/lisp/vc-hooks.el
diff options
context:
space:
mode:
authorEric S. Raymond <esr@snark.thyrsus.com>2007-10-11 11:22:19 +0000
committerEric S. Raymond <esr@snark.thyrsus.com>2007-10-11 11:22:19 +0000
commit44cd688b7bd379472f900fa1571ed17fd649730e (patch)
tree3bd62dd42c1424ceef092e5064d19fae43ed9861 /lisp/vc-hooks.el
parent5ffc62f5e67eae370dd19a07ad5629975ad9b2ea (diff)
downloademacs-44cd688b7bd379472f900fa1571ed17fd649730e.tar.gz
Robustify a bit against filenames with no directory component.
Diffstat (limited to 'lisp/vc-hooks.el')
-rw-r--r--lisp/vc-hooks.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index d2825f9b5bb..64ce29ddaf4 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -362,7 +362,8 @@ file was previously registered under a certain backend, then that
backend is tried first."
(let (handler)
(cond
- ((string-match vc-ignore-dir-regexp (file-name-directory file)) nil)
+ ((and (file-name-directory file) (string-match vc-ignore-dir-regexp (file-name-directory file)))
+ nil)
((and (boundp 'file-name-handler-alist)
(setq handler (find-file-name-handler file 'vc-registered)))
;; handler should set vc-backend and return t if registered