From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.bugs Subject: bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy Date: Fri, 13 Jan 2012 09:38:30 +0100 Message-ID: <87pqeoro8p.fsf@gmail.com> References: <87mx9su32g.fsf@web.de> <87sjjkfvwt.fsf@gmail.com> <8362ggkquq.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1326443980 21188 80.91.229.12 (13 Jan 2012 08:39:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 13 Jan 2012 08:39:40 +0000 (UTC) Cc: 10489@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 13 09:39:36 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rlcfe-0003Fc-Bc for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Jan 2012 09:39:34 +0100 Original-Received: from localhost ([::1]:44055 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rlcfd-0001SU-Bt for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Jan 2012 03:39:33 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:48483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rlcfa-0001SC-LH for bug-gnu-emacs@gnu.org; Fri, 13 Jan 2012 03:39:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RlcfW-0006hc-IO for bug-gnu-emacs@gnu.org; Fri, 13 Jan 2012 03:39:30 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:32910) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlcfW-0006hY-Cl for bug-gnu-emacs@gnu.org; Fri, 13 Jan 2012 03:39:26 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Rlcg5-0002lR-Oj for bug-gnu-emacs@gnu.org; Fri, 13 Jan 2012 03:40:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Thierry Volpiatto Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Jan 2012 08:40: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: Original-Received: via spool by 10489-submit@debbugs.gnu.org id=B10489.132644395610570 (code B ref 10489); Fri, 13 Jan 2012 08:40:01 +0000 Original-Received: (at 10489) by debbugs.gnu.org; 13 Jan 2012 08:39:16 +0000 Original-Received: from localhost ([127.0.0.1]:55816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RlcfL-0002kQ-60 for submit@debbugs.gnu.org; Fri, 13 Jan 2012 03:39:15 -0500 Original-Received: from mail-we0-f172.google.com ([74.125.82.172]:48361) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RlcfI-0002kI-Hc for 10489@debbugs.gnu.org; Fri, 13 Jan 2012 03:39:14 -0500 Original-Received: by werl4 with SMTP id l4so206310wer.3 for <10489@debbugs.gnu.org>; Fri, 13 Jan 2012 00:38:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=6MKQa0SuOzf+AHgPTFS0quY51peCtBDkxxYLyjMVS3M=; b=EGh6dOlk1TEFdwzq3FzCrdxpFxdNq8UbMM5i4OEXgG3o9cZ2JrjX+u8+pjiqYIn0Cj btP8UEdB87BoO/KVfYefJ5T+NyJUj9eYkNydOY5qyia4NdinU6xcv1qP9sFEUzRwppxi NtiQ9NSn7Jpk7mhIbASaIJgYq0cUnb4tHIqdA= Original-Received: by 10.216.134.162 with SMTP id s34mr573096wei.59.1326443915836; Fri, 13 Jan 2012 00:38:35 -0800 (PST) Original-Received: from thierry-MM061 (121.77.197.77.rev.sfr.net. [77.197.77.121]) by mx.google.com with ESMTPS id o1sm9211114wbh.9.2012.01.13.00.38.32 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 Jan 2012 00:38:34 -0800 (PST) In-Reply-To: <8362ggkquq.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 13 Jan 2012 09:23:57 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) 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:55671 Archived-At: Hi Eli, Eli Zaretskii writes: > I don't think this will solves all the use cases. File names are not > strings, you cannot compare them as literal strings and hope to plumb > all the leaks. A test with `equal' is already used in `dired-create-files', (equal from to) Is it the correct way to compare two filenames? > Some situations which I think this patch will not handle correctly: > > . file names with different letter-case on a case-insensitive file > system Can you provide example or better a recipe. > . relative vs absolute file names Same. > . file names that are hard links to the same directory (this includes > the infamous 8+3 short aliases on Windows) Don't know on Windows, (My knowledge of links in windows is very limited) here it is difficult (impossible as User) to Hardlink a directory: --8<---------------cut here---------------start------------->8--- man ln: -d, -F, --directory allow the superuser to attempt to hard link directories (note: will probably fail due to system restrictions, even for the superuser) --8<---------------cut here---------------end--------------->8--- > I didn't actually try the patch, so apologies if I missed something > which makes these non-issues. Didn't try yet on Windows. However, it is working fine for common usage on GNU/Linux, with M-x copy-directory M-: (dired-copy-file/recursive x y) and `C' from dired. Would be great you try it for the use cases you describe above. (Maybe with a version of the patch that use `equal') -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997