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: Mon, 27 Feb 2012 20:33:47 +0100 Message-ID: <87mx84kr50.fsf@gmail.com> References: <87mx9su32g.fsf@web.de> <87wr7cgsm3.fsf@gmx.de> <8762eww77b.fsf@gmail.com> <83pqd4roav.fsf@gnu.org> <87haygx97t.fsf@gmx.de> <87aa47rj6z.fsf@gmail.com> <878vjrxpej.fsf@gmx.de> <87pqd3i8ky.fsf@gmail.com> <87ipiuvsbw.fsf@gmx.de> <87k439gyu5.fsf@gmail.com> <87fwdwhizm.fsf@gmail.com> <87bookhfcn.fsf@gmail.com> <87aa44o7qo.fsf@gmail.com> <87ty2c490n.fsf@gmail.com> <87r4xgkt2b.fsf@gmail.com> <87obskum9i.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1330371263 2230 80.91.229.3 (27 Feb 2012 19:34:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Feb 2012 19:34:23 +0000 (UTC) Cc: 10489@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 27 20:34:22 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S26Kz-0003UC-EM for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Feb 2012 20:34:21 +0100 Original-Received: from localhost ([::1]:42130 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S26Ky-0005xO-Vj for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Feb 2012 14:34:20 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:35717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S26Kt-0005wK-Fg for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2012 14:34:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S26Kn-0002Mo-Jf for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2012 14:34:15 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58274) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S26Kn-0002Mj-E5 for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2012 14:34:09 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1S26NZ-0006YJ-M1 for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2012 14:37: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: Mon, 27 Feb 2012 19:37: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.133037140725166 (code B ref 10489); Mon, 27 Feb 2012 19:37:01 +0000 Original-Received: (at 10489) by debbugs.gnu.org; 27 Feb 2012 19:36:47 +0000 Original-Received: from localhost ([127.0.0.1]:60171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S26NL-0006Xp-Ir for submit@debbugs.gnu.org; Mon, 27 Feb 2012 14:36:47 -0500 Original-Received: from mail-ww0-f46.google.com ([74.125.82.46]:49452) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S26NI-0006Xh-GS for 10489@debbugs.gnu.org; Mon, 27 Feb 2012 14:36:45 -0500 Original-Received: by wgbdq11 with SMTP id dq11so1123863wgb.15 for <10489@debbugs.gnu.org>; Mon, 27 Feb 2012 11:33:51 -0800 (PST) Received-SPF: pass (google.com: domain of thierry.volpiatto@gmail.com designates 10.180.95.34 as permitted sender) client-ip=10.180.95.34; Authentication-Results: mr.google.com; spf=pass (google.com: domain of thierry.volpiatto@gmail.com designates 10.180.95.34 as permitted sender) smtp.mail=thierry.volpiatto@gmail.com; dkim=pass header.i=thierry.volpiatto@gmail.com Original-Received: from mr.google.com ([10.180.95.34]) by 10.180.95.34 with SMTP id dh2mr14408608wib.15.1330371231356 (num_hops = 1); Mon, 27 Feb 2012 11:33:51 -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=ifS5MnmgaRbclIp3RvmNaQ5CII975bKlJugohpBl1QY=; b=Gp1B78wCVayrLLE7SdiqPTiPBMMyxzLHrTNIzdwMQv03jy6osxs/MHC6bhyUmFEOCj RtpYGuGh/LxjCFxF4o86T1Ahybxgkx9jM5KsrIO8u8eTjH97fM3lV+sxGLRPo5iPuhVA jQEK0LI2zKvtKIS5DOwtOI2Whj09zrW4jcUO8= Original-Received: by 10.180.95.34 with SMTP id dh2mr11356774wib.15.1330371231298; Mon, 27 Feb 2012 11:33:51 -0800 (PST) Original-Received: from thierry-MM061 (lbe83-2-78-243-104-167.fbx.proxad.net. [78.243.104.167]) by mx.google.com with ESMTPS id gp8sm23976328wib.5.2012.02.27.11.33.49 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 27 Feb 2012 11:33:50 -0800 (PST) In-Reply-To: <87obskum9i.fsf@gmx.de> (Michael Albinus's message of "Mon, 27 Feb 2012 20:08:57 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (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:57325 Archived-At: Michael Albinus writes: > Thierry Volpiatto writes: > >> If you don't create "test1" and file-subdir-of-p is unable to handle a >> non--existing directory,I don't understand how you want to do. > > I was saying that files-equal-p returns unexpected results in case both > files do not exist. In this case this version return nil even if noexist is not provided. (defun files-equal-p (file1 file2 &optional noexist) "Return non-nil if FILE1 and FILE2 name the same file. This function works even on non--existing files." (let ((handler (or (find-file-name-handler file1 'files-equal-p) (find-file-name-handler file2 'files-equal-p)))) (if handler (funcall handler 'files-equal-p file1 file2 noexist) (let ((f1-attr (file-attributes (file-truename file1))) (f2-attr (file-attributes (file-truename file2)))) (if (and f1-attr f2-attr) (equal f1-attr f2-attr) (when noexist (string= (file-truename (file-name-as-directory file1)) (file-truename (file-name-as-directory file2))))))))) > I haven't spoken about file-subdir-of-p. > > Best regards, Michael. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997