From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: bug in copy-directory Date: Tue, 01 Feb 2011 10:44:21 +0100 Message-ID: <87hbcot7gq.fsf@gmx.de> References: <87ipxaidea.fsf@gmail.com> <87k4hp96g0.fsf@stupidchicken.com> <878vy59ejz.fsf@stupidchicken.com> <87lj23ickn.fsf@stupidchicken.com> <87sjway8i3.fsf@gmx.de> <87wrll2ebe.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1296554758 6476 80.91.229.12 (1 Feb 2011 10:05:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 1 Feb 2011 10:05:58 +0000 (UTC) Cc: emacs-devel@gnu.org, Stefan Monnier , Thierry Volpiatto To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 01 11:05:53 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PkD7R-0006wN-BC for ged-emacs-devel@m.gmane.org; Tue, 01 Feb 2011 11:05:53 +0100 Original-Received: from localhost ([127.0.0.1]:46454 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkD3F-0005sm-E7 for ged-emacs-devel@m.gmane.org; Tue, 01 Feb 2011 05:01:33 -0500 Original-Received: from [140.186.70.92] (port=46378 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkCwH-0002yp-1v for emacs-devel@gnu.org; Tue, 01 Feb 2011 04:54:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PkCnm-0005vT-Kv for emacs-devel@gnu.org; Tue, 01 Feb 2011 04:45:35 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:43214) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PkCnm-0005mW-6V for emacs-devel@gnu.org; Tue, 01 Feb 2011 04:45:34 -0500 Original-Received: (qmail invoked by alias); 01 Feb 2011 09:44:31 -0000 Original-Received: from p57BBD27F.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.210.127] by mail.gmx.net (mp016) with SMTP; 01 Feb 2011 10:44:31 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX194sTlQKrl4Cc6xHbblrwk9ZOE8MVQk3D+/z94h2F 8afbwfh/BEu0ZX In-Reply-To: <87wrll2ebe.fsf@stupidchicken.com> (Chong Yidong's message of "Mon, 31 Jan 2011 12:06:13 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 213.165.64.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:135391 Archived-At: Chong Yidong writes: > Michael Albinus writes: > >> Your patch breaks recursive copy now. Extend the use case from that bug >> report: >> >> - Create directory /tmp/test >> - Create directory /tmp/test/test >> - Create file /tmp/test/a >> - Create file /tmp/test/test/b >> >> - Apply (copy-directory "/tmp/test" "~/") >> Everything is fine >> >> - Apply again (copy-directory "/tmp/test" "~/") >> The target directory structure is broken. > > I think I see the problem: the arguments to the recursive call to > copy-directory were not taking the "copy as a subdirectory" behavior > into account. I've committed a fix. It works fine, thank you. But there seems to be a bug in dired; when I copy "/tmp/test" to "~/" twice, I see the corrupted directory structure. (This seems to be the misunderstanding between Thierry and me, 'cause I have used dired for my tests). I've tested also (copy-directory "/ssh::/tmp/test" "/ssh::~/") (copy-directory "/rsync::/tmp/test" "/rsync::~/") In the ssh case, Tramp falls back to the default implementation. For rsync, there is an own implementation. Both tests are successful; Tramp seems to be OK. Best regards, Michael.