changeset 4030:e5cf0991893a

(file-relative-name): If we use default-directory, call expand-file-name anyway.
author Richard M. Stallman <rms@gnu.org>
date Thu, 08 Jul 1993 03:04:52 +0000
parents 8bf916902edc
children ac159693513e
files lisp/files.el
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Wed Jul 07 22:21:19 1993 +0000
+++ b/lisp/files.el	Thu Jul 08 03:04:52 1993 +0000
@@ -1321,9 +1321,8 @@
 (defun file-relative-name (filename &optional directory)
   "Convert FILENAME to be relative to DIRECTORY (default: default-directory)."
   (setq filename (expand-file-name filename)
-	directory (file-name-as-directory (if directory
-					      (expand-file-name directory)
-					      default-directory)))
+	directory (file-name-as-directory (expand-file-name
+					   (or directory default-directory))))
   (file-relative-name-1 directory))
 
 (defun save-buffer (&optional args)