From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy Date: Fri, 24 Feb 2012 16:33:56 +0200 Message-ID: <83wr7cs3l7.fsf@gnu.org> References: <87mx9su32g.fsf@web.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> <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> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1330095044 1494 80.91.229.3 (24 Feb 2012 14:50:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 24 Feb 2012 14:50:44 +0000 (UTC) Cc: 10489@debbugs.gnu.org, thierry.volpiatto@gmail.com To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 24 15:50:42 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 1S0wTq-0007hd-L4 for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Feb 2012 15:50:42 +0100 Original-Received: from localhost ([::1]:43963 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0wTq-0006FT-4h for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Feb 2012 09:50:42 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:46239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0wTh-0006Ai-QP for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2012 09:50:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0wTW-0004Sz-49 for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2012 09:50:37 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51683) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0wTW-0004Sa-0n for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2012 09:50:22 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1S0wGc-00089Q-50 for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2012 09:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Feb 2012 14:37:02 +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.133009418631283 (code B ref 10489); Fri, 24 Feb 2012 14:37:02 +0000 Original-Received: (at 10489) by debbugs.gnu.org; 24 Feb 2012 14:36:26 +0000 Original-Received: from localhost ([127.0.0.1]:53561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S0wG2-00088V-20 for submit@debbugs.gnu.org; Fri, 24 Feb 2012 09:36:26 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:50485) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S0wFx-00088E-Lx for 10489@debbugs.gnu.org; Fri, 24 Feb 2012 09:36:24 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LZW00B00J1D5A00@a-mtaout22.012.net.il> for 10489@debbugs.gnu.org; Fri, 24 Feb 2012 16:33:40 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.127.12.178]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LZW00A6LJ439NG0@a-mtaout22.012.net.il>; Fri, 24 Feb 2012 16:33:40 +0200 (IST) In-reply-to: <87haygie87.fsf@gmx.de> X-012-Sender: halo1@inter.net.il 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:57169 Archived-At: > From: Michael Albinus > Cc: Eli Zaretskii , 10489@debbugs.gnu.org > Date: Fri, 24 Feb 2012 13:54:16 +0100 > > > +(defun files-equal-p (file1 file2) > > + "Return non-nil if FILE1 and FILE2 name the same file." > > + (and (equal (file-remote-p file1) (file-remote-p file2)) > > + (equal (file-attributes (file-truename file1)) > > + (file-attributes (file-truename file2))))) > > This implementation requires, that inode number and filesystem device > number are always unique. This is true for local files, if you run a > Unix-like system. It is not guaranteed for remote files. And it is even > not guaranted, if the local system is Windows: on mounted drives, the > returned inode number is 0: Mounted how (i.e. with what command or feature)? Btw, this function is only interested in directories; do directories also return a zero for inode in that case? Anyway, I'd consider this a bug in `stat' implemented in w32.c, and wouldn't bother the Lisp code with that. The probability of 2 directories having _all_ of their attributes identical is very small, even if we don't fix this in w32.c. As an additional precaution, we could compare their absolute file names as well.