From: Eli Zaretskii Date: Mon, 2 Feb 2004 20:52:20 +0000 (+0000) Subject: (Fcopy_file): If NEWNAME is a directory, expand the X-Git-Tag: ttn-vms-21-2-B4~7771 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dcdbbb5dc5d52c2fa7387b347e4e4739c199a4f9;p=emacs.git (Fcopy_file): If NEWNAME is a directory, expand the basename of FILE relative to it, not FILE itself. --- diff --git a/src/ChangeLog b/src/ChangeLog index 9a93ac894ca..76d63cab844 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-02-02 Eli Zaretskii + + * fileio.c (Fcopy_file): If NEWNAME is a directory, expand the + basename of FILE relative to it, not FILE itself. + 2004-02-02 Kenichi Handa * coding.c (coding_restore_composition): Check invalid diff --git a/src/fileio.c b/src/fileio.c index c7959b3672d..73771591994 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2407,7 +2407,7 @@ Also set the file modes of the target file to match the source file. */) CHECK_STRING (newname); if (!NILP (Ffile_directory_p (newname))) - newname = Fexpand_file_name (file, newname); + newname = Fexpand_file_name (Ffile_name_nondirectory (file), newname); else newname = Fexpand_file_name (newname, Qnil);