From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: Re: bug in copy-directory Date: Wed, 02 Feb 2011 09:19:08 +0100 Message-ID: <87lj1yrgqr.fsf@gmail.com> 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> <87hbcot7gq.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1296663581 6972 80.91.229.12 (2 Feb 2011 16:19:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 2 Feb 2011 16:19:41 +0000 (UTC) Cc: Chong Yidong , Stefan Monnier , emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 02 17:19:36 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 1PkfQb-0007x7-Gx for ged-emacs-devel@m.gmane.org; Wed, 02 Feb 2011 17:19:34 +0100 Original-Received: from localhost ([127.0.0.1]:37911 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkfQZ-0007Db-LZ for ged-emacs-devel@m.gmane.org; Wed, 02 Feb 2011 11:19:31 -0500 Original-Received: from [140.186.70.92] (port=37172 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pke4t-0002R0-O8 for emacs-devel@gnu.org; Wed, 02 Feb 2011 09:53:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PkXvm-0004KO-1K for emacs-devel@gnu.org; Wed, 02 Feb 2011 03:19:15 -0500 Original-Received: from mail-ww0-f49.google.com ([74.125.82.49]:41257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PkXvl-0004KJ-Sd for emacs-devel@gnu.org; Wed, 02 Feb 2011 03:19:13 -0500 Original-Received: by wwb17 with SMTP id 17so8059352wwb.30 for ; Wed, 02 Feb 2011 00:19:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=bUeRpBMzqYwj1iBezyCrvLg//f+ClmLVKxW14+pylbw=; b=grmW9rtl4RMZWdWVvdee5OoRVMeozCH8zNffRYqXoivskQQrZdqaTSXKZ30QzNHvUx 6MFXp0pVkjKeyUmg5B1EA37eMDWNDXFXU44Oq30rHh6x6qjUh7zr9/5UcSfx8Lz4Ibnd ovFKgk6z934Ye+T0XSKEhmGPjgh2NwcHoKnkI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=wck9s4oYwjZaIqx0MwuRDVZ5WBuQrUB2v/0Oxv9Ff8GdjXgNt9Xb9LzAIvFYzIg2f/ g411LnIKSOwXT5PyDb4cajuS+52pHRS+57nG0sLFUufhw4KbbFr4xdn/uLW6w2BYhzjU 6dN4oODDNxa30bSQYElGspe3edIupLvUebnsM= Original-Received: by 10.216.185.199 with SMTP id u49mr9230610wem.45.1296634752156; Wed, 02 Feb 2011 00:19:12 -0800 (PST) Original-Received: from thierry-MM061 (63.211.85-79.rev.gaoland.net [79.85.211.63]) by mx.google.com with ESMTPS id u2sm9361870weh.36.2011.02.02.00.19.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 02 Feb 2011 00:19:10 -0800 (PST) In-Reply-To: <87hbcot7gq.fsf@gmx.de> (Michael Albinus's message of "Tue, 01 Feb 2011 10:44:21 +0100") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.49 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:135464 Archived-At: Michael Albinus writes: > Chong Yidong writes: > >> Michael Albinus writes: > 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. Michael and Chong, could you try on your side, using the last version of copy-directory, modify the call to dired-create-files in dired-do-create-files something like this: (not tested in dired yet) (dired-create-files fn (symbol-name action) files ;; CANDIDATE is the destination. (if (file-directory-p candidate) ;; When CANDIDATE is a directory, build file-name in this directory. ;; Else we use CANDIDATE. #'(lambda (from) (let ((target (expand-file-name (file-name-nondirectory from) candidate))) (if (file-directory-p target) candidate target))) #'(lambda (from) candidate)) marker) NOTE: the message "Overwrite ..." will be wrong, ignore it for the moment (use non--important dirs to be sure). -- A+ Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997