From: Richard M. Stallman Date: Sat, 27 Jul 2002 19:09:54 +0000 (+0000) Subject: (file-name-sans-extension): Avoid expanding DIRECTORY. X-Git-Tag: ttn-vms-21-2-B4~13842 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6ee24f1e72319fb7d70e4cd5f8c15e9e955329a0;p=emacs.git (file-name-sans-extension): Avoid expanding DIRECTORY. --- diff --git a/lisp/files.el b/lisp/files.el index ac1712229fd..3fe0fa479ee 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2468,8 +2468,9 @@ except that a leading `.', if any, doesn't count." (if (and (string-match "\\.[^.]*\\'" file) (not (eq 0 (match-beginning 0)))) (if (setq directory (file-name-directory filename)) - (expand-file-name (substring file 0 (match-beginning 0)) - directory) + ;; Don't use expand-file-name here; if DIRECTORY is relative, + ;; we don't want to expand it. + (concat directory (substring file 0 (match-beginning 0))) (substring file 0 (match-beginning 0))) filename))))