[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
vc-find-root and nonexistent drives
From: |
Juanma Barranquero |
Subject: |
vc-find-root and nonexistent drives |
Date: |
Sat, 16 Feb 2008 04:52:35 +0100 |
On Windows, trying to visit a file in a non-existent drive loops in
`vc-find-root'.
The reason is that currently, `vc-find-root' does:
(while (not (file-directory-p file))
(setq file (file-name-directory (directory-file-name file))))
which assumes that the output of `file-name-directory' will be
different in each iteration of the while loop. That is not so when the
drive does not exist, for example:
(file-name-directory (directory-file-name "g:/")) => "g:/"
This is not an obscure bug. "C-x C-f g:/myfile", o "emacsclient
g:/myfile" will trigger it if g: does not exist. It happens in
EMACS_22_BASE too.
Juanma