aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/files.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2002-07-27 19:09:54 +0000
committerRichard M. Stallman <[email protected]>2002-07-27 19:09:54 +0000
commit6ee24f1e72319fb7d70e4cd5f8c15e9e955329a0 (patch)
tree9663d6acea37c47d85d5f1fba50ad0811d742fc6 /lisp/files.el
parent01af8a38f43cc3292c0e94710ce5cff8387e4ed2 (diff)
(file-name-sans-extension): Avoid expanding DIRECTORY.
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/files.el b/lisp/files.el
index ac1712229f..3fe0fa479e 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))))