From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy Date: Fri, 24 Feb 2012 16:00:34 +0100 Message-ID: <87d394i8dp.fsf@gmx.de> References: <87mx9su32g.fsf@web.de> <87r4z0yqfx.fsf@gmail.com> <871uqzn3bc.fsf@gmx.de> <871uqz651u.fsf@gmx.de> <87pqd89lh4.fsf@gmail.com> <87mx8b3nvb.fsf@gmail.com> <87pqd6wnvv.fsf@gmail.com> <87d395y1w0.fsf@gmail.com> <87zkc8x04p.fsf@gmail.com> <87vcmwwvk7.fsf@gmail.com> <834nugtwqf.fsf@gnu.org> <87r4xkwhky.fsf@gmail.com> <87haygie87.fsf@gmx.de> <87mx88wdys.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1330095705 6630 80.91.229.3 (24 Feb 2012 15:01:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 24 Feb 2012 15:01:45 +0000 (UTC) Cc: 10489@debbugs.gnu.org To: Thierry Volpiatto Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 24 16:01:45 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S0weW-0005ZZ-HQ for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Feb 2012 16:01:44 +0100 Original-Received: from localhost ([::1]:59955 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0weV-0000IW-Ow for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Feb 2012 10:01:43 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0weQ-0000IG-0j for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2012 10:01:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0weG-0006mv-CO for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2012 10:01:37 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0weG-0006mq-8P for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2012 10:01:28 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1S0wgj-0000To-PX for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2012 10:04:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Feb 2012 15:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10489 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 10489-submit@debbugs.gnu.org id=B10489.13300958121797 (code B ref 10489); Fri, 24 Feb 2012 15:04:01 +0000 Original-Received: (at 10489) by debbugs.gnu.org; 24 Feb 2012 15:03:32 +0000 Original-Received: from localhost ([127.0.0.1]:54229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S0wgD-0000St-Gs for submit@debbugs.gnu.org; Fri, 24 Feb 2012 10:03:31 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:57771) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1S0wg9-0000Se-GE for 10489@debbugs.gnu.org; Fri, 24 Feb 2012 10:03:27 -0500 Original-Received: (qmail invoked by alias); 24 Feb 2012 15:00:44 -0000 Original-Received: from p57BB94C0.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.148.192] by mail.gmx.net (mp004) with SMTP; 24 Feb 2012 16:00:44 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX19Vkm88qylVbieG0dYlCtWTmzTcMhQGd5uPPvpiau gRvGDYkbruUH1D In-Reply-To: <87mx88wdys.fsf@gmail.com> (Thierry Volpiatto's message of "Fri, 24 Feb 2012 14:36:11 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:57171 Archived-At: Thierry Volpiatto writes: > Hi Michael, Hi Thierry, >> For both functions, please check for a file name handler, and call it if >> available. It doesn't matter that they are not implemented yet; there is >> the fallback to the native implementation in that case. >> >> With this check, I could start to implement the file name handlers in >> Tramp's upstream repository. > Do you mean something like in copy-directory: > > --8<---------------cut here---------------start------------->8--- > (let ((handler (or (find-file-name-handler directory 'copy-directory) > (find-file-name-handler newname 'copy-directory)))) > (if handler > (funcall handler 'copy-directory directory newname keep-time parents) > --8<---------------cut here---------------end--------------->8--- Yes. And in the example you have shown, please add COPY-CONTENTS to the call of the handler, this is another error in `copy-directory'. > So what do you propose for such a case? Check, whether inode number and device number are trustworthy. A value of 0 or '(0 0) isn't. Fall back to the hard way (compare file names via string-equal). Best regards, Michael.