From: Kai Großjohann Date: Fri, 25 Apr 2003 14:14:31 +0000 (+0000) Subject: (file-relative-name): Recognize "c:/foo" as absolute X-Git-Tag: ttn-vms-21-2-B4~10417 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c8df97026c2e527f2f2621f5217cda2de96d32a5;p=emacs.git (file-relative-name): Recognize "c:/foo" as absolute file name. Tiny change from David PONCE . --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 70e6c018f11..2cce2d1f7dc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2003-04-25 Kai Gro,A_(Bjohann + + * files.el (file-relative-name): Recognize "c:/foo" as absolute + file name. Tiny change from David PONCE . + 2003-04-24 Sam Steingold * calendar/diary-lib.el (fancy-diary-display-mode): Bind "q" to diff --git a/lisp/files.el b/lisp/files.el index c18cc2e20ac..48e8dda0e74 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -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)))