GNU bug report logs -
#29362
27.0.50; copy-file no longer copying when second argument is a directory
Previous Next
Reported by: kramer <at> cogeco.ca (Bryan M. Kramer)
Date: Sun, 19 Nov 2017 21:09:02 UTC
Severity: normal
Tags: notabug
Found in version 27.0.50
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 29362 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Bryan M. Kramer <kramer <at> cogeco.ca> schrieb am So., 19. Nov. 2017 um
22:09 Uhr:
>
> copy-file help states if second argument is a directory, it will create
> a properly named file in the directory. This is no longer the case in
> this version of emacs.
>
This is working as intended, see NEWS:
** Several functions that create or rename files now treat their
destination argument specially only when it is a directory name, i.e.,
when it ends in '/' on GNU and other POSIX-like systems. When the
destination argument D of one of these functions is an existing
directory and the intent is to act on an entry in that directory, D
should now be a directory name. For example, (rename-file "e" "f/")
renames to 'f/e'. Although this formerly happened sometimes even when
D was not a directory name, as in (rename-file "e" "f") where 'f'
happened to be a directory, the old behavior often contradicted the
documentation and had inherent races that led to security holes. A
call like (rename-file C D) that used the old, undocumented behavior
can be written as (rename-file C (file-name-as-directory D)), a
formulation portable to both older and newer versions of Emacs.
Affected functions include 'add-name-to-file', 'copy-directory',
'copy-file', 'format-write-file', 'gnus-copy-file',
'make-symbolic-link', 'rename-file', 'thumbs-rename-images', and
'write-file'.
[Message part 2 (text/html, inline)]
This bug report was last modified 7 years and 244 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.