From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy Date: Tue, 21 Feb 2012 12:59:16 -0500 Message-ID: References: <87mx9su32g.fsf@web.de> <878vlbljnc.fsf@gmx.de> <8739bj8mu1.fsf@gmail.com> <87fwfjo24c.fsf@gmx.de> <87pqen76p4.fsf@gmail.com> <83fwfik92e.fsf@gnu.org> <87mx9q1sz7.fsf@gmail.com> <87vcodm8ns.fsf@gmx.de> <87pqekopb5.fsf@gmail.com> <87hazwoost.fsf@gmail.com> <87ty3w9639.fsf@gmx.de> <8762gckckt.fsf@gmail.com> <87pqek9269.fsf@gmx.de> <87r4z0yqfx.fsf@gmail.com> <871uqzn3bc.fsf@gmx.de> <871uqz651u.fsf@gmx.de> <87pqd89lh4.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1329847197 660 80.91.229.3 (21 Feb 2012 17:59:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 21 Feb 2012 17:59:57 +0000 (UTC) Cc: 10489@debbugs.gnu.org, Michael Albinus To: Thierry Volpiatto Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 21 18:59:55 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 1Rzu0I-0006pZ-Lo for geb-bug-gnu-emacs@m.gmane.org; Tue, 21 Feb 2012 18:59:54 +0100 Original-Received: from localhost ([::1]:54744 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rzu0I-0002Mw-2Y for geb-bug-gnu-emacs@m.gmane.org; Tue, 21 Feb 2012 12:59:54 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:34770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rzu0E-0002Mb-AM for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2012 12:59:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rzu08-0000JA-K4 for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2012 12:59:50 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45420) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rzu08-0000Iy-IW for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2012 12:59:44 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Rzu2L-0007js-L8 for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2012 13:02:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Feb 2012 18:02: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.132984730029712 (code B ref 10489); Tue, 21 Feb 2012 18:02:01 +0000 Original-Received: (at 10489) by debbugs.gnu.org; 21 Feb 2012 18:01:40 +0000 Original-Received: from localhost ([127.0.0.1]:49043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rzu1y-0007jA-VQ for submit@debbugs.gnu.org; Tue, 21 Feb 2012 13:01:39 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:56855) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rzu1u-0007j0-Pr for 10489@debbugs.gnu.org; Tue, 21 Feb 2012 13:01:36 -0500 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q1LHxGQY006324; Tue, 21 Feb 2012 12:59:16 -0500 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 29BB6B4467; Tue, 21 Feb 2012 12:59:16 -0500 (EST) In-Reply-To: <87pqd89lh4.fsf@gmail.com> (Thierry Volpiatto's message of "Tue, 21 Feb 2012 17:53:27 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4139=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4139> : streams <730917> : uri <1069643> 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:57047 Archived-At: > so what is the state of this bug and what do you plan for this? > As a reminder, we needed: > 1) A function to compare filenames locally. > 2) A tramp handler for this function. > 3) A function to check if file1 is subdir of file2, locally also. > 4) A tramp handler for this one also? > We have more or less 1 and 3, need tramp handlers for them. > What else is needed? Just before we try and solve this problem the hard way: I just tried: % ln -s erlang-otp erl % cp -r erl/lib erlang-otp/lib/inviso/ on my Debian system, and it told me "cp: impossible de cr=E9er un r=E9pertoire (=AB=A0erl/lib=A0=BB) dans lui-m=EAme (=AB=A0erlang-otp/lib/in= viso/lib=A0=BB)", but note that it only told me so *after* performing the copy. I.e. it only detected the problem when trying to make erlang-otp/lib/inviso/lib/inviso/lib So it seems that the coreutils guys have found it sufficient to detect the inf-loop after the fact and interrupt the operation at that point rather than to try and predict that the cp will loop and don't perform it at all. It might be easier to get a solution that catches all cases that way: remember the name and identity (inode/file-attributes/younameit) of the top directory we create, and whenever we're about to copy a directory of the same name, check whether it happens to have the same identity, in which case we've hit an inf-loop. Stefan