(file-relative-name): Recognize "c:/foo" as absolute

file name.  Tiny change from David PONCE <david.ponce@wanadoo.fr>.
This commit is contained in:
Kai Großjohann 2003-04-25 14:14:31 +00:00
parent 03954a42ce
commit c8df97026c
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2003-04-25 Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net>
* files.el (file-relative-name): Recognize "c:/foo" as absolute
file name. Tiny change from David PONCE <david.ponce@wanadoo.fr>.
2003-04-24 Sam Steingold <sds@gnu.org>
* calendar/diary-lib.el (fancy-diary-display-mode): Bind "q" to

View file

@ -2909,9 +2909,9 @@ on a DOS/Windows machine, it returns FILENAME on expanded form."
(string-match re directory)
(substring directory 0 (match-end 0))))))))
filename
(unless (eq (aref filename 0) ?/)
(unless (file-name-absolute-p filename)
(setq filename (concat "/" filename)))
(unless (eq (aref directory 0) ?/)
(unless (file-name-absolute-p directory)
(setq directory (concat "/" directory)))
(let ((ancestor ".")
(filename-dir (file-name-as-directory filename)))