all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: "Bryan M. Kramer" <kramer@cogeco.ca>
Cc: 29362@debbugs.gnu.org
Subject: bug#29362: 27.0.50; copy-file no longer copying when second argument is a directory
Date: Sun, 19 Nov 2017 21:40:04 +0000	[thread overview]
Message-ID: <CAArVCkTT4LNisQe-vjWjGvx09cmhVcXe93oktkX6k5kr-opi+Q@mail.gmail.com> (raw)
In-Reply-To: <87mv3i6kps.fsf@fedora17.home>

[-- Attachment #1: Type: text/plain, Size: 1366 bytes --]

Bryan M. Kramer <kramer@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'.

[-- Attachment #2: Type: text/html, Size: 1983 bytes --]

      reply	other threads:[~2017-11-19 21:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-19 21:07 bug#29362: 27.0.50; copy-file no longer copying when second argument is a directory Bryan M. Kramer
2017-11-19 21:40 ` Philipp Stephani [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAArVCkTT4LNisQe-vjWjGvx09cmhVcXe93oktkX6k5kr-opi+Q@mail.gmail.com \
    --to=p.stephani2@gmail.com \
    --cc=29362@debbugs.gnu.org \
    --cc=kramer@cogeco.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.