# HG changeset patch # User Eric S. Raymond # Date 1192101598 0 # Node ID 93de0ca0707d4151d3073cb9331eccdbed10e371 # Parent 781d1ba5e7a213074c012385f3fb00b395bf6e99 Robustify a bit against filenames with no directory component. diff -r 781d1ba5e7a2 -r 93de0ca0707d lisp/vc-hooks.el --- a/lisp/vc-hooks.el Thu Oct 11 03:47:14 2007 +0000 +++ b/lisp/vc-hooks.el Thu Oct 11 11:19:58 2007 +0000 @@ -362,7 +362,8 @@ 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