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:19:13 +0100 Message-ID: <8762ewi7im.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> <83wr7cs3l7.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1330096839 15859 80.91.229.3 (24 Feb 2012 15:20:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 24 Feb 2012 15:20:39 +0000 (UTC) Cc: 10489@debbugs.gnu.org, thierry.volpiatto@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 24 16:20:34 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 1S0wwj-00088N-HG for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Feb 2012 16:20:33 +0100 Original-Received: from localhost ([::1]:40122 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0wwi-0000xP-Vt for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Feb 2012 10:20:32 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:46420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0wwf-0000x5-Hw for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2012 10:20:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0wwe-0002Pt-98 for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2012 10:20:29 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0wwe-0002Pn-4q for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2012 10:20:28 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1S0wz7-0001Ad-VC for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2012 10:23: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:23: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.13300969254382 (code B ref 10489); Fri, 24 Feb 2012 15:23:01 +0000 Original-Received: (at 10489) by debbugs.gnu.org; 24 Feb 2012 15:22:05 +0000 Original-Received: from localhost ([127.0.0.1]:54251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S0wyC-00018c-Ha for submit@debbugs.gnu.org; Fri, 24 Feb 2012 10:22:05 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:40519) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1S0wy9-000180-PE for 10489@debbugs.gnu.org; Fri, 24 Feb 2012 10:22:03 -0500 Original-Received: (qmail invoked by alias); 24 Feb 2012 15:19:20 -0000 Original-Received: from p57BB94C0.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.148.192] by mail.gmx.net (mp040) with SMTP; 24 Feb 2012 16:19:20 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1939kIEt853kpB8uwYrG5fwOCp2DwBu6bbzyNYZHP gtA+V/wIvFlV2z In-Reply-To: <83wr7cs3l7.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 24 Feb 2012 16:33:56 +0200") 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:57172 Archived-At: Eli Zaretskii writes: >> 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)? Don't know, somebody has added "network drives" to my login. All I can say is --8<---------------cut here---------------start------------->8--- U:\>net use New connections will be remembered. Status Local Remote Network ------------------------------------------------------------------------------- Disconnected R: \\ASLSDA0\ZENTRAL Microsoft Windows Network OK U: \\DESTGSFILN2\lb01177$ Microsoft Windows Network OK Y: \\sambager1\albinus Microsoft Windows Network The command completed successfully. --8<---------------cut here---------------end--------------->8--- > Btw, this function is only interested in directories; do directories > also return a zero for inode in that case? We are speaking about (defun files-equal-p (file1 file2) ... This is also for files. However, there is the same problem with directories: (file-attributes "y:/") => (t 1 101567 513 (0 0) (0 0) (0 0) 0 "drwxrwxrwx" nil 0 (47631 . 5881)) > Anyway, I'd consider this a bug in `stat' implemented in w32.c, and > wouldn't bother the Lisp code with that. OK, that would be fine. Do we know, that device number and inode number are trustworthy on all systems Emacs runs? When I've started with Tramp years ago, it was the first lesson I've learnt, that we shouldn't use inode and device numbers for serious things. And I have the impression, both values aren't used heavily (this was a result of code inspection some years ago, it might have changed). > The probability of 2 directories having _all_ of their attributes > identical is very small, even if we don't fix this in w32.c. We are also speaking about files. And then it is a problem. Example: On UNIX: # cp -p ~/.emacs ~/to-be-tested On Windows (y: is my UNIX home directory): (equal (file-attributes "y:/.emacs") (file-attributes "y:/to-be-tested")) => t Best regards, Michael.