]> code.delx.au - gnu-emacs/commitdiff
(Fcopy_file): If NEWNAME is a directory, expand the
authorEli Zaretskii <eliz@is.elta.co.il>
Mon, 2 Feb 2004 20:52:20 +0000 (20:52 +0000)
committerEli Zaretskii <eliz@is.elta.co.il>
Mon, 2 Feb 2004 20:52:20 +0000 (20:52 +0000)
basename of FILE relative to it, not FILE itself.

src/ChangeLog
src/fileio.c

index 9a93ac894ca3a81504dfc46e447bd798ba5d81d6..76d63cab84449b9199ebfdac54f4ae5c38b8a081 100644 (file)
@@ -1,3 +1,8 @@
+2004-02-02  Eli Zaretskii  <eliz@elta.co.il>
+
+       * 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  <handa@m17n.org>
 
        * coding.c (coding_restore_composition): Check invalid
index c7959b3672dd89b4252700fd6ebf198a08671978..737715919945696cb8a1a1e5ccb6f9bf5c35c4ac 100644 (file)
@@ -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);