From: Lars Ingebrigtsen <larsi@gnus.org>
To: Thierry Volpiatto <thierry.volpiatto@gmail.com>
Cc: 10897@debbugs.gnu.org
Subject: bug#10897: copy-directory create new directory when copying a symlink
Date: Tue, 25 Aug 2020 14:47:07 +0200 [thread overview]
Message-ID: <87zh6i99kk.fsf@gnus.org> (raw)
In-Reply-To: <874nuchddl.fsf@gmail.com> (Thierry Volpiatto's message of "Mon, 27 Feb 2012 09:47:02 +0100")
Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
> when copying a directory symlink to another directory, the behavior of
> 'cp' is to create a new symlink in this directory:
>
> thierry@thierry-MM061:~ $ mkdir ~/Test
> thierry@thierry-MM061:~ $ mkdir ~/tmp/Test1
> thierry@thierry-MM061:~ $ ln -s ~/tmp/Test1 ~/tmp/foo
> thierry@thierry-MM061:~ $ cp -r ~/tmp/foo ~/Test
> thierry@thierry-MM061:~ $ ls -l ~/Test
> total 0
> lrwxrwxrwx 1 thierry thierry 23 2012-02-27 09:08 foo -> /home/thierry/tmp/Test1
>
> It is not what's copy-directory does:
>
> (copy-directory "~/tmp/foo" "~/Test" nil t)
> =>
> thierry@thierry-MM061:~ $ ls -l ~/Test
> total 4
> drwxrwxr-x 2 thierry thierry 4096 2012-02-27 09:11 foo
I'm unable to reproduce the bug using this recipe -- at the end of this,
I just have an empty ~/Test directory.
Which is also different from what cp -r does, but I'm not sure that's a
bug -- when you tell copy-directory to copy a symlink, I think it's
natural to dereference that symlink first?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2020-08-25 12:47 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-27 8:47 bug#10897: copy-directory create new directory when copying a symlink Thierry Volpiatto
2012-02-27 9:11 ` Lars Magne Ingebrigtsen
2012-02-27 9:30 ` Thierry Volpiatto
2012-02-27 10:32 ` Lars Magne Ingebrigtsen
2012-02-27 15:22 ` Thierry Volpiatto
2012-03-09 23:07 ` Lars Magne Ingebrigtsen
2012-03-10 6:08 ` Thierry Volpiatto
2012-03-03 8:42 ` bug#10897: sending mail via report-emacs-bug Thierry Volpiatto
2012-03-03 8:49 ` Eli Zaretskii
2012-03-03 9:29 ` Thierry Volpiatto
2012-03-03 10:04 ` Thierry Volpiatto
2012-03-03 14:29 ` Lars Magne Ingebrigtsen
2012-03-03 14:59 ` Thierry Volpiatto
2012-03-03 15:05 ` Lars Magne Ingebrigtsen
2012-03-03 17:08 ` Thierry Volpiatto
2012-03-03 17:20 ` Thierry Volpiatto
2012-03-04 15:02 ` Lars Magne Ingebrigtsen
2012-03-05 13:58 ` Thierry Volpiatto
2012-03-03 14:33 ` Lars Magne Ingebrigtsen
2020-08-25 12:47 ` Lars Ingebrigtsen [this message]
2020-10-13 2:33 ` bug#10897: copy-directory create new directory when copying a symlink Lars Ingebrigtsen
2020-10-13 3:15 ` Glenn Morris
2020-10-13 3:19 ` Lars Ingebrigtsen
2021-08-19 21:47 ` Marco Centurion
2021-08-20 1:08 ` Marco Centurion
2021-08-20 5:51 ` Eli Zaretskii
2021-08-22 13:34 ` Michael Albinus
2021-08-22 13:46 ` Eli Zaretskii
2021-08-22 14:58 ` Michael Albinus
2021-08-22 16:47 ` Eli Zaretskii
2021-08-22 17:13 ` Michael Albinus
2021-08-22 18:48 ` Michael Albinus
2021-08-20 13:44 ` Lars Ingebrigtsen
2021-08-20 14:29 ` Marco Centurion - URI
2021-08-20 14:38 ` Lars Ingebrigtsen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zh6i99kk.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=10897@debbugs.gnu.org \
--cc=thierry.volpiatto@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).