From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#10897: copy-directory create new directory when copying a symlink Date: Tue, 25 Aug 2020 14:47:07 +0200 Message-ID: <87zh6i99kk.fsf@gnus.org> References: <874nuchddl.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6183"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 10897@debbugs.gnu.org To: Thierry Volpiatto Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 25 14:48:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAYN0-0001UR-3n for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Aug 2020 14:48:10 +0200 Original-Received: from localhost ([::1]:52002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAYMz-0005XP-6T for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Aug 2020 08:48:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37660) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAYMs-0005X6-Gi for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 08:48:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49115) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kAYMs-0008Ey-8L for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 08:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kAYMs-0001zZ-7A for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 08:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Aug 2020 12:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10897 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 10897-submit@debbugs.gnu.org id=B10897.15983596437612 (code B ref 10897); Tue, 25 Aug 2020 12:48:02 +0000 Original-Received: (at 10897) by debbugs.gnu.org; 25 Aug 2020 12:47:23 +0000 Original-Received: from localhost ([127.0.0.1]:60661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAYME-0001yh-NS for submit@debbugs.gnu.org; Tue, 25 Aug 2020 08:47:22 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:41108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAYMC-0001yU-Sr for 10897@debbugs.gnu.org; Tue, 25 Aug 2020 08:47:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=jwK1EqzKsS/9fCl8D73ERBdx+TmiWQVEYekstJSzCkQ=; b=fyKxXxJEFiCiyyr8Ejk6BwTTiC kwp5xz0gAZGSjOUw8ozUzTvvEVnUHpft64vHOJhqDZje0vDvfCCIetz0kNu5b93e67R/27g/MY5H1 zpX9rFwChmn8ril5yLBzPoeuMbjlGV0TSC3/F4eNpaPOeKcDpvdB8t6uBYcs8QZMUh9Y=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAYM0-0005Yz-H4; Tue, 25 Aug 2020 14:47:14 +0200 X-Now-Playing: DACM's =?UTF-8?Q?=5FSt=C3=83=C2=A9r=C3=83=C2=A9otypie=5F:?= "Vidya" In-Reply-To: <874nuchddl.fsf@gmail.com> (Thierry Volpiatto's message of "Mon, 27 Feb 2012 09:47:02 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:186274 Archived-At: Thierry Volpiatto 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