From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 19 18:43:04 2017 Received: (at submit) by debbugs.gnu.org; 19 Sep 2017 22:43:04 +0000 Received: from localhost ([127.0.0.1]:48794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duREM-0000Go-IP for submit@debbugs.gnu.org; Tue, 19 Sep 2017 18:43:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49193) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duR6U-00005N-SO for submit@debbugs.gnu.org; Tue, 19 Sep 2017 18:34:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duR6O-0007bb-NX for submit@debbugs.gnu.org; Tue, 19 Sep 2017 18:34:49 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56073) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1duR6O-0007bP-KJ for submit@debbugs.gnu.org; Tue, 19 Sep 2017 18:34:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duR6N-0005rl-1g for bug-gnu-emacs@gnu.org; Tue, 19 Sep 2017 18:34:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duR6L-0007Z5-R4 for bug-gnu-emacs@gnu.org; Tue, 19 Sep 2017 18:34:47 -0400 Received: from mail-yw0-x234.google.com ([2607:f8b0:4002:c05::234]:53170) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1duR6L-0007Yp-MZ for bug-gnu-emacs@gnu.org; Tue, 19 Sep 2017 18:34:45 -0400 Received: by mail-yw0-x234.google.com with SMTP id i6so743733ywc.9 for ; Tue, 19 Sep 2017 15:34:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to :content-transfer-encoding; bh=Y/dhR6Oy2kyJNjUPkVmEZIdVaHrYpL3rVc5Beptkds4=; b=h1NfVNmkTs1bXeuI5gkwry0/MrBZbaf1TXc5iET2UOYuSDs+jIgZAdVlWdDlST0ScR hdQsB9vkaOTKlz4+5BxOaJZszVACXma5izHgQIQSCE6MiDeWDihx1ufvcuKYmZh/zY7z Vn2TAebPflsvmd5M5+fUMmREnp85nvya507dwf4KJMNjsvprNPFGXrV1y1ApWtjv24ru 09nFb576r94GBOOl2DcAcXxySdXDv2Do8/sjyx2VYWC81cVH0CI8vnFPCxXKTeyrA3du 9AAVBngQTHrfWdRukQUqsvT+LVr7QyicEZMQQfFp8gfdRw1cv56hFy7Rin8LGptD+YP6 ggEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to:content-transfer-encoding; bh=Y/dhR6Oy2kyJNjUPkVmEZIdVaHrYpL3rVc5Beptkds4=; b=cSIqf+m9HjIIGif19P5NueCeVXT/psZV1/PPaau5Zw4K/zEXwrYHdLUPgty3fVOzYV Qlfj++KnZNm1JMgfeGL4NnKR/Lk8S98JhXTgJDdhTq+nl/KTOEaQuojK1OeSqN/jJ87a lbZ3luX4Vr6wOTDnkKJ1Bq0WM24rDOuHMlQVt38ZkDoFtLxTDgX09+3/s49RnQjH4xz2 mOigcD0uLZalruwsk3HP2h2HjPWfWcU6TPn3Bt8cHfyRvkqYvrZl8lcX4g9zAU4kMbF3 +oeHLtur5VAO9WMweW9CDwy8wS9NcX7iCVvB53dTD8o4rsCHzWMDfOZRYmdwAyzfJQq7 mP6Q== X-Gm-Message-State: AHPjjUiaNrkkxR45uzET/Bff/XvFJ7hGT/awNkTyuHOU9szq/A8YHnkO iiE7MnNVl4jjjG0edmmw9k76SsRe9tu9txplJ2dA9w== X-Google-Smtp-Source: AOwi7QB+55RhD0NDRSrqGSyRotHBPwd0jFPKZk8i+yu7kls9tE5myw0VX088JyBNkAdTxUjCrmb7i7vCEvDpORgIvvQ= X-Received: by 10.37.189.69 with SMTP id p5mr1983965ybm.128.1505860484815; Tue, 19 Sep 2017 15:34:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.216.131 with HTTP; Tue, 19 Sep 2017 15:34:43 -0700 (PDT) From: adam plaice Date: Tue, 19 Sep 2017 23:34:43 +0100 X-Google-Sender-Auth: SuyeTRe28bWND3SgyrEW5kI8Opk Message-ID: Subject: 26.0.50; Dired recursive copy of directory fails To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 19 Sep 2017 18:42:59 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Copying a directory recursively, with dired ("C"), fails. To reproduce: mkdir test_dired_copy/a1/b -p cd test_dired_copy emacs -Q --eval '(dired ".")' In dired, execute `dired-do-copy' (kbd "C") on the `a1' directory, select `a2' (within the same parent directory) as the destination, and answer `yes' to (`Recursive copies of ...?'). *Dired log* contains (in my specific case): Copy =E2=80=98/home/adam/test_dired_copy/a1=E2=80=99 to =E2=80=98/home/adam= /test_dired_copy/a2=E2=80=99 failed: (file-already-exists File exists /home/adam/test_dired_copy/a2) Copy failed for 1 of 1 file The result is that the directory `a2' is created, but the subdirectory `b' is not created within it. (For repeated testing, `a2' has to be deleted each time.) I think (though I'm not completely sure) that the problem can be traced to copy-directory, since the following elisp fails as well: (copy-directory "/home/adam/test_dired_copy/a1" "/home/adam/test_dired_copy= /a2") or equivalently (if already within the directory): (copy-directory "a1" "a2") The regression occurred in the commit range 52739ffe773eb403f58a6223b7ef64175df58dd7..e22794867d878d53675fcc91d2ef1ad24= 94a2ff2 (I have not had time to rebuild emacs sufficiently many times and check which exact commit is responsible). The bug is present in the heads of both the emacs-26 (4bef92e9e02d074de1d92e30dc5ef4dd62558c80) and master (b1f83c10df7d1bbb16f4e13d18119ad4aa1a2137) branches. Thank you, Adam In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2017-09-13 built on adam Repository revision: 4bef92e9e02d074de1d92e30dc5ef4dd62558c80 Windowing system distributor 'The X.Org Foundation', version 11.0.11804000 System Description: Ubuntu 16.04.3 LTS Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --with-modules --without-pop' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES LIBSYSTEMD LCMS2 Important settings: value of $LANG: en_GB.UTF-8 value of $XMODIFIERS: @im=3Dibus locale-coding-system: utf-8-unix Major mode: Dired by name Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message subr-x puny cl-macs seq byte-opt gv bytecomp byte-compile cconv format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils dired-aux cl-loaddefs cl-lib dired dired-loaddefs elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 100826 7691) (symbols 48 20537 1) (miscs 40 52 193) (strings 32 28786 1222) (string-bytes 1 745696) (vectors 16 15163) (vector-slots 8 497313 9957) (floats 8 48 124) (intervals 56 824 11) (buffers 992 15) (heap 1024 24906 1131)) From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 20 04:34:02 2017 Received: (at 28520) by debbugs.gnu.org; 20 Sep 2017 08:34:02 +0000 Received: from localhost ([127.0.0.1]:49069 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duaSI-0007ZN-N7 for submit@debbugs.gnu.org; Wed, 20 Sep 2017 04:34:02 -0400 Received: from mail-pf0-f170.google.com ([209.85.192.170]:44715) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duaSG-0007Ys-PI for 28520@debbugs.gnu.org; Wed, 20 Sep 2017 04:34:01 -0400 Received: by mail-pf0-f170.google.com with SMTP id e1so1211519pfk.1 for <28520@debbugs.gnu.org>; Wed, 20 Sep 2017 01:34:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=EMn2YYj7ADBHarwal1KKHTPheWiIv3s25k69vYq4qf0=; b=qb80frcN23h/NgdIkKtUPCJTrBNfoaJDHEMj2PKuH38ZAa8kbGMYXO4qgX1B6i03TN U8uDFb+b+yPh01PvRRw8TvMfAA9YETm363TlizPw7VegHykWP2boZOuNDJiTheHhbjYf ficq3mQgER/QKbVhEAQfw0pFgL5KlYp1/5GeklwUUj6jg514wkrCW+VKwkG7b89fcOt3 CsJ5i6+npt+5iYPajX7QIB5YUZtfj5tljnzzFXgL/eN6LPbBpRtrXFWzZb2YzADB2Md/ on0UrxT+41PuXTd2CpyXskKQPtES2u06N06XYGq4MPWO4aiDHmjDgQBWO8zBeCvZQG1S q1oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=EMn2YYj7ADBHarwal1KKHTPheWiIv3s25k69vYq4qf0=; b=YED/jfzZzSzxNZph44TdkxnA9+0mL/nqocXDMswF32foXBO8grRTtqNSHtAW4yBpik EZtvQ9x/tw+FCJbayaLHLzkoKX4FdKssJdpVqvb3sUjCN3TqokMl/g42cLfbXHaTYQ6o +dTiBoYy/4OyqiN0kDhWX4Xu2dpdmGbiVFCr7zHvyNnOb2fV8kYvzfoqja9ufWMp0b4G hHBOTss3bK3xbzm7h0CIy8pfDlReioueo7WMBqOtzkIltlw7cb3kop5NqHJAJQOYBfTV mXhJVl5zx7GQkdLtNBxnef6mHThnFb4dZjULjhbyzxtgEBMrpVC4m68euFQlueQ+3KaQ y4SQ== X-Gm-Message-State: AHPjjUicog3oXEHAf7V6neaaz1E0Fr+K+JkfkWEsJRskDpWY/zM/cNLI 4fuc7P7eACEgjGqJ0i8dWBg= X-Google-Smtp-Source: AOwi7QC4Wmwdxheq4PeR233yd3gJwzDCGMKGeQ1NuDqg6L76xtV299xOhCHEoI7E1or1hCeTKyhcug== X-Received: by 10.98.196.206 with SMTP id h75mr1403815pfk.55.1505896434962; Wed, 20 Sep 2017 01:33:54 -0700 (PDT) Received: from calancha-pc ([103.5.140.144]) by smtp.gmail.com with ESMTPSA id x4sm6276179pfb.101.2017.09.20.01.33.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Sep 2017 01:33:54 -0700 (PDT) From: Tino Calancha To: adam plaice Subject: Re: bug#28520: 26.0.50; Dired recursive copy of directory fails References: Date: Wed, 20 Sep 2017 17:33:49 +0900 In-Reply-To: (adam plaice's message of "Tue, 19 Sep 2017 23:34:43 +0100") Message-ID: <87shfhn502.fsf@calancha-pc> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 28520 Cc: 28520@debbugs.gnu.org, Paul Eggert X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) adam plaice writes: > Copying a directory recursively, with dired ("C"), fails. > > To reproduce: > > mkdir test_dired_copy/a1/b -p > cd test_dired_copy > emacs -Q --eval '(dired ".")' > > In dired, execute `dired-do-copy' (kbd "C") on the `a1' directory, > select `a2' (within the same parent directory) as the destination, and > answer `yes' to (`Recursive copies of ...?'). > > *Dired log* contains (in my specific case): > > > Copy =E2=80=98/home/adam/test_dired_copy/a1=E2=80=99 to =E2=80=98/home/ad= am/test_dired_copy/a2=E2=80=99 failed: > (file-already-exists File exists /home/adam/test_dired_copy/a2) > > Copy failed for 1 of 1 file > > > The result is that the directory `a2' is created, but the subdirectory > `b' is not created within it. (For repeated testing, `a2' has to be > deleted each time.) Thank you for the report. It seems the bug started with commit: Make copy-directory act like copy-file etc. (e22794867d8) From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 20 04:34:15 2017 Received: (at control) by debbugs.gnu.org; 20 Sep 2017 08:34:15 +0000 Received: from localhost ([127.0.0.1]:49072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duaSU-0007Zo-UG for submit@debbugs.gnu.org; Wed, 20 Sep 2017 04:34:15 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36930) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duaST-0007Zb-Dc for control@debbugs.gnu.org; Wed, 20 Sep 2017 04:34:13 -0400 Received: by mail-pf0-f196.google.com with SMTP id e69so932832pfg.4 for ; Wed, 20 Sep 2017 01:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:to:from:subject; bh=4pmEI6fMv2C96FKGMWn/LNxjKRUjpimq6Nlu+J4P4ak=; b=rQm8DwtY0IRAmHoGdQ5OhSBFF1aTfHKYzXepFb0FVtOQUGyqAGf8TAoNyaJEBZfsvt VeaCpMdo2KEpkAiZzsZe3eAMSFE8aQV8rk8y8oGcMLA5q83mf4sJGZ+DURvzBmCgzCZO wCasIE36MpwaXluSxADdKQMTc9c/sBdB8c481LyfYo7mRBtmRS7ym37U+vmBCG6HYR/Q 1ScLSuPLl4kNi87gtkdftskmJBe7U+JIZR5Dgx5LAQVW16Pi62JuZeELdWxQCBcOFdHx wJNnbN443gc1CHhi8EXY+WYscy/m6OyAjt1pqppILNA4FLm+7rhghcF64c3PkgyW4w/S kIGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:to:from:subject; bh=4pmEI6fMv2C96FKGMWn/LNxjKRUjpimq6Nlu+J4P4ak=; b=ZpPdVYXAjK8Y28srxWz52KGulhrXyqVGx3TTtHcIlyL8vqeZS3EwqaQjVu93tYPwgY pg6G8aC2UIm+m+Vx20R3crgUVLgHjyB2rv2t75pJRkdz7MrLq6SznAFrAw+wIyB7En87 ah/6hEQ/7Zer6sx9o4wXNtKlFVK035NyoGTFLMV51uL6HGxorOLqm/dzbtONdbiF4/7c S+/Fc0ELsmZ2vq6liRfPfiZy5gkvGzpqaHUVIPFP9LYdmbGFPsF5PYb57KxvZ0selQgF 1f4eUEETpWZKB0GUoa4yI9h1p21ib3NX8J36k0UpU6PuQRxAZTpEdHTwDn74QfhWVG9E rVAg== X-Gm-Message-State: AHPjjUhFWLj5uxXP3imtP/BIVvFIEvIfHVVz9Tblm+/vLvDlNeLGD6i7 OAq1G2ImE90lzt/hSR0P9djHpQ== X-Google-Smtp-Source: AOwi7QBsdmJK5ccEjeMkssXebuLlTt1E4J7RSU5Mk1nLTHqPrGkOtL/wjeMtOSFFrnXxYz/Aj4dM0A== X-Received: by 10.98.32.92 with SMTP id g89mr1359248pfg.285.1505896447619; Wed, 20 Sep 2017 01:34:07 -0700 (PDT) Received: from calancha-pc ([103.5.140.144]) by smtp.gmail.com with ESMTPSA id z24sm6944569pfk.3.2017.09.20.01.34.06 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Sep 2017 01:34:07 -0700 (PDT) Date: Wed, 20 Sep 2017 17:34:04 +0900 Message-Id: <87r2v1n4zn.fsf@calancha-pc> To: control@debbugs.gnu.org From: Tino Calancha Subject: control message for bug #28520 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) tags 28520 confirmed From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 20 14:59:49 2017 Received: (at 28520-done) by debbugs.gnu.org; 20 Sep 2017 18:59:49 +0000 Received: from localhost ([127.0.0.1]:50494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dukDt-0001HW-DE for submit@debbugs.gnu.org; Wed, 20 Sep 2017 14:59:49 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:56394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dukDp-0001H7-7H; Wed, 20 Sep 2017 14:59:45 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3C64B160AEB; Wed, 20 Sep 2017 11:59:39 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id GO5z218rFOvq; Wed, 20 Sep 2017 11:59:38 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4E639160BF0; Wed, 20 Sep 2017 11:59:38 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 62g8EZC72wKQ; Wed, 20 Sep 2017 11:59:38 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 2DC3B160AEB; Wed, 20 Sep 2017 11:59:38 -0700 (PDT) Subject: Re: bug#28483: 26.0.50; copy-directory does not create directories To: Eli Zaretskii References: <972c8b3c-f72d-d447-78b3-cc7fcf6234e5@cs.ucla.edu> <83mv5pfw5b.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Wed, 20 Sep 2017 11:59:37 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <83mv5pfw5b.fsf@gnu.org> Content-Type: multipart/mixed; boundary="------------76E760785E419C48D3063ADA" Content-Language: en-US X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 28520-done Cc: 28483@debbugs.gnu.org, Adam Plaice , 28520-done@debbugs.gnu.org, aaronjensen@gmail.com, Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) This is a multi-part message in MIME format. --------------76E760785E419C48D3063ADA Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 09/20/2017 04:26 AM, Eli Zaretskii wrote: > I think the problem is in this line: > > (cond > ((eq filetype t) ; Directory but not a symlink. > (copy-directory file newname keep-time parents)) <<<<<<<<<<< > > Instead of 'newname', there should be (file-name-as-directory newname) > there. I think. Thanks for diagnosing the problem and for the fix. That fix should work, and I think we can improve on it slightly by using (copy-directory file target keep-time parents t), as this makes the cond branch more parallel with the other alternatives and avoids a call to file-name-as-directory. So I installed the attached patch into the emacs-26 branch to do that, and to add a test case for this bug. This patch should also fix Bug#28520 "Dired recursive copy of directory fails", so I'll CC: that bug report and boldly close it. PS. Sorry, Adam, for misspelling your first name in the commit message. I'll try to remember to fix that when it spills out into the ChangeLog file. --------------76E760785E419C48D3063ADA Content-Type: text/x-patch; name="0001-Fix-new-copy-directory-bug-with-empty-dirs.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Fix-new-copy-directory-bug-with-empty-dirs.patch" >From b4531a78ded7efb0c133763b5efe1f4dab1aa4de Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 20 Sep 2017 11:49:12 -0700 Subject: [PATCH] Fix new copy-directory bug with empty dirs Problem reported by Afdam Plaice (Bug#28520) and by Eli Zaretskii (Bug#28483#34). This is another bug that I introduced in my recent copy-directory changes. * lisp/files.el (copy-directory): Work with empty subdirectories, too. * test/lisp/files-tests.el (files-tests--copy-directory): Test for this bug. --- lisp/files.el | 2 +- test/lisp/files-tests.el | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index 0c30d40c13..f0a1f2380d 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -5564,7 +5564,7 @@ copy-directory (filetype (car (file-attributes file)))) (cond ((eq filetype t) ; Directory but not a symlink. - (copy-directory file newname keep-time parents)) + (copy-directory file target keep-time parents t)) ((stringp filetype) ; Symbolic link (make-symbolic-link filetype target t)) ((copy-file file target t keep-time))))) diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index f2a9a32180..285a884b69 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -399,11 +399,16 @@ files-tests--with-temp-file (dirname (file-name-as-directory dir)) (source (concat dirname "source")) (dest (concat dirname "dest/new/directory/")) - (file (concat (file-name-as-directory source) "file"))) + (file (concat (file-name-as-directory source) "file")) + (source2 (concat dirname "source2")) + (dest2 (concat dirname "dest/new2"))) (make-directory source) (write-region "" nil file) (copy-directory source dest t t t) (should (file-exists-p (concat dest "file"))) + (make-directory (concat (file-name-as-directory source2) "a") t) + (copy-directory source2 dest2) + (should (file-directory-p (concat (file-name-as-directory dest2) "a"))) (delete-directory dir 'recursive))) (provide 'files-tests) -- 2.13.5 --------------76E760785E419C48D3063ADA-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 20 15:54:56 2017 Received: (at 28520) by debbugs.gnu.org; 20 Sep 2017 19:54:56 +0000 Received: from localhost ([127.0.0.1]:50529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dul5E-0002cJ-5f for submit@debbugs.gnu.org; Wed, 20 Sep 2017 15:54:56 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49449) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dul5C-0002c6-Tp for 28520@debbugs.gnu.org; Wed, 20 Sep 2017 15:54:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dul53-0004RV-4p for 28520@debbugs.gnu.org; Wed, 20 Sep 2017 15:54:49 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48451) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dul4s-0004Gj-Rx; Wed, 20 Sep 2017 15:54:34 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3848 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dul4s-0003jW-Ai; Wed, 20 Sep 2017 15:54:34 -0400 Date: Wed, 20 Sep 2017 22:54:26 +0300 Message-Id: <837ewtf8nh.fsf@gnu.org> From: Eli Zaretskii To: Paul Eggert In-reply-to: (message from Paul Eggert on Wed, 20 Sep 2017 11:59:37 -0700) Subject: Re: bug#28483: 26.0.50; copy-directory does not create directories References: <972c8b3c-f72d-d447-78b3-cc7fcf6234e5@cs.ucla.edu> <83mv5pfw5b.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28520 Cc: 28483@debbugs.gnu.org, plaice.adam+lists@gmail.com, 28520@debbugs.gnu.org, aaronjensen@gmail.com, tino.calancha@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Cc: 28483@debbugs.gnu.org, aaronjensen@gmail.com, 28520-done@debbugs.gnu.org, > Adam Plaice , > Tino Calancha > From: Paul Eggert > Date: Wed, 20 Sep 2017 11:59:37 -0700 > > Thanks for diagnosing the problem and for the fix. That fix should work, > and I think we can improve on it slightly by using (copy-directory file > target keep-time parents t), as this makes the cond branch more parallel > with the other alternatives and avoids a call to file-name-as-directory. > So I installed the attached patch into the emacs-26 branch to do that, > and to add a test case for this bug. Thanks, works for me. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 20 19:07:48 2017 Received: (at 28520) by debbugs.gnu.org; 20 Sep 2017 23:07:48 +0000 Received: from localhost ([127.0.0.1]:50668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duo5r-0000sd-RQ for submit@debbugs.gnu.org; Wed, 20 Sep 2017 19:07:48 -0400 Received: from mail-yw0-f178.google.com ([209.85.161.178]:45015) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duo34-0000o8-S6 for 28520@debbugs.gnu.org; Wed, 20 Sep 2017 19:04:55 -0400 Received: by mail-yw0-f178.google.com with SMTP id r85so2962936ywg.1 for <28520@debbugs.gnu.org>; Wed, 20 Sep 2017 16:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5as1X7ZqQwVT+f39TBwxjSR2208c1ZNDeIYn8l3rvmk=; b=og02lTYNG4JfNQsw5jvsudBWRTtmOQPAQ8sF7jzfEx4mwoYdC+ArwlNsv312UjCahc +wiaFsuhKe3YdV9MVL3sAnBc+osN8yZ62gP6RCxKh7Wbj5/+sMNs92sjWp0JM18JIqcw RUX748Y/Hgyrr050vkiZIAZr0N7NQpLqZfwbc4qoNuRQZCSPLxj1Fc81NnV5b5rwR90N U7FTGf5/3N74zta19svZbK2PMm7k21Qybu2PYVBsKKc1s5DvNXWplALrCDas3puIYz2w Gi9sooJyTybRNnVA6dZ7eOm2ZAUBX6tYiYJp/85FBQEAfBZWeZkTtz4tjakRxx4XqvQf Uakw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5as1X7ZqQwVT+f39TBwxjSR2208c1ZNDeIYn8l3rvmk=; b=NAA+h6NkuLPdNWKYLMcgd9M9MLgx7UsotOq5+swsqTM6jxA1PwdW9C9wUSLZa0ryZK AoRPh2xBjHgVr6myKVNaADzYvQ1f9MKb+4w56AlMdruNfXJZen5XxyiAulN7IeIkuHdi s1F858ztgno3WCVytMmwL5zPMZHxz0aNxOhiYoYMZcBAGKCdtVjQrWjmhXk+XmbArkdH /PK0yW9OC5XOpUqJfizZwfuexJ9w2EWMjkceKjLZJGS76NfTOhDN2D8RAIaChyf8iDBe +wUReHMb/fRlSvXWOhEaACmGpiRI5/dwf4elgQYh/vilNkQBc0INvIifBUzvZDS0jKLs V5DQ== X-Gm-Message-State: AHPjjUhSdQdAQbAEVbn9NTFenp0KF95IcThccM7MklHJExLreFVZLtYJ J/5LLpPiPaMT00NRjdoefaZgd0OHIhRnrnEjL50= X-Google-Smtp-Source: AOwi7QDOtAdMC6e1wEILCzuMr0f4Bht7ZKYC4OAO1mAAQ5FsCR/EHAAmQvwUOqGp/znfEoP+XYZN/PBnEhcJ3hwoGKw= X-Received: by 10.37.164.9 with SMTP id f9mr236927ybi.357.1505948689313; Wed, 20 Sep 2017 16:04:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.115.212 with HTTP; Wed, 20 Sep 2017 16:04:48 -0700 (PDT) In-Reply-To: <837ewtf8nh.fsf@gnu.org> References: <972c8b3c-f72d-d447-78b3-cc7fcf6234e5@cs.ucla.edu> <83mv5pfw5b.fsf@gnu.org> <837ewtf8nh.fsf@gnu.org> From: Adam Plaice Date: Thu, 21 Sep 2017 00:04:48 +0100 Message-ID: Subject: Re: bug#28483: 26.0.50; copy-directory does not create directories To: Eli Zaretskii , Paul Eggert Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28520 X-Mailman-Approved-At: Wed, 20 Sep 2017 19:07:46 -0400 Cc: 28520@debbugs.gnu.org, tino.calancha@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Thanks for the very fast fix. The commit indeed resolves the problem for me. Adam > PS. Sorry, Adam, for misspelling your first name in the commit message. I'll try to remember to fix that when it spills out into the ChangeLog file. Don't worry about it! From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 21 01:55:57 2017 Received: (at control) by debbugs.gnu.org; 21 Sep 2017 05:55:58 +0000 Received: from localhost ([127.0.0.1]:50792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duuSr-0004IL-M9 for submit@debbugs.gnu.org; Thu, 21 Sep 2017 01:55:57 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:36573) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duuSp-0004I9-NA for control@debbugs.gnu.org; Thu, 21 Sep 2017 01:55:55 -0400 Received: by mail-pf0-f195.google.com with SMTP id f84so2098547pfj.3 for ; Wed, 20 Sep 2017 22:55:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:to:from:subject; bh=poxyPkP984InTZKRAtKCAqrCFMu0gzYsQ5hiIXaMCmI=; b=pItwnIJghoAWMKT4YhTBMuMgnp2FJHt9KW53EPIi2jMe/NOoJdygm/3gfLW+6YFvrE JsKCPduzBU7b+EqXwGko659UeOwpY9bLqqXdPfuShTGthpY73hXzq8V5GRQ717NFs6U2 MTF1IgH2mKvYQmRkOAk0SoXgYUxQ4BZk1R1cWNDNZbicm/1KoKQfmMT2mrjhW6LXSXRB 21G59w6i2mTl36z+Y6VMf8dYBbFf4kz6TqmbQ9qPWhPxMJmsBxQnjLF10z/s2gk9Hg7t gDc5vR9itYKtmi3r3hInFx2TJbTF9gMTEnsRr3McE/3cF8u8d+mS6/Y2ze6fooElnZnr v7GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:to:from:subject; bh=poxyPkP984InTZKRAtKCAqrCFMu0gzYsQ5hiIXaMCmI=; b=Ct0rIgQlOA23hN1hF+URVtMO6m4z0eLdXACimtfmWJLQi8XR0Z3QRSN73ynG2dgQ03 3VyekTMHL2ZLVemSLTKk0pQASKpCKg1NGzLtOYe5xzHa7IoY6V+e523fdFblPtaceP3H UeblLCogttK6dZAwWEco/KR14zwhIeRnBpeq9l/beViRZqjIJ6f17YTJjYEGB19cljiW 5fLJEQbvj+JZjWSyjeiFk/M2t2WGv0sVkTRBToF1ezxAF6bgjRdN6IcMvJ7TX1LXM74D RAfMud0fsSTjc1LOwrn2uD3MunEBSmLIIYc23fyFChMLl+Pm3WS1wfht/lvJwk0cB1kl 2Biw== X-Gm-Message-State: AHPjjUj4BgEum06EGzG3f+5O6uo5zL11IV9f277IyviJyJLKR1Q1eYMS JfNq2oPOP21U1PqI6pquU3Zfbw== X-Google-Smtp-Source: AOwi7QCYc6hsZ0LHjdvmHOd9T35SrEoOsVwEJBnvZfXsiOWvZ/7ayWjoFka+mGxV20e/bE909sdL9g== X-Received: by 10.84.238.207 with SMTP id l15mr4405300pln.194.1505973349873; Wed, 20 Sep 2017 22:55:49 -0700 (PDT) Received: from calancha-pc ([103.5.140.166]) by smtp.gmail.com with ESMTPSA id o79sm963120pfi.108.2017.09.20.22.55.48 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Sep 2017 22:55:49 -0700 (PDT) Date: Thu, 21 Sep 2017 14:55:35 +0900 Message-Id: <87fubgmw88.fsf@calancha-pc> To: control@debbugs.gnu.org From: Tino Calancha Subject: control message for bug #28529 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) forcemerge 28529 28520 From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 21 01:57:48 2017 Received: (at control) by debbugs.gnu.org; 21 Sep 2017 05:57:48 +0000 Received: from localhost ([127.0.0.1]:50803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duuUe-0004Lx-92 for submit@debbugs.gnu.org; Thu, 21 Sep 2017 01:57:48 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:35261) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duuUc-0004Lk-4B for control@debbugs.gnu.org; Thu, 21 Sep 2017 01:57:47 -0400 Received: by mail-pg0-f67.google.com with SMTP id j16so2900119pga.2 for ; Wed, 20 Sep 2017 22:57:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:to:from:subject; bh=J6GkzZCObs8lkvikATOIWHHhFMX0WrslW4Au5+tUdiI=; b=TwVrepzTyOnvjn1/2OEX+gWPqacn7SCnQoxJ7LQjd/gqatik+U6vHOHyvefcL77Jki 0B26Mbb3VJJ2ZZAxA4N/ovsQU0ZCUT8sy5zLzbMS6ZycUA/KsIUlmNph9dgJX/nmWtY5 goDIYuacKHlMiRi/aRa4DSFa09kbGPZwdexXK0b3Gnd689jkv7zTKshlEZnZcEMtxPE9 QdmBQfAKu3LzvFhXjP9lDN5DVSFCeRTUbRHtCZTxYHdcSdG0Ou5WJ2cbTWEF2+0NbY2s ubOonU+fXscLWz1HTDmTujlhRvcJiFdDspvagiidW/vdQeR0aIs+fsW/nx1wzTU9MTzz 0Rdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:to:from:subject; bh=J6GkzZCObs8lkvikATOIWHHhFMX0WrslW4Au5+tUdiI=; b=H9XrWyL3QpAjs1I7LKWP8tx/alkZOdKWl8JOuFR0P62epUfstn4gl/p0T4FOSiaSnv movblByN1uOXtx80J8iZ+scZ2aKBsbVCFdIcNxUNL9XikbqxVMM2ptm3bdBMiJoxwKkB Ue+4bEQVQe1PMDu0aGaf4ZRIuWaGWcAUQ6KlwdRfcLTb+zgnDZzkpDSRJQEir+nO57gM t0UKf3EL5JA/px9WzBfrxB9E3/1OjSATya1lr6cegQusi0J1g5YbMp0arwrsR5tVibNb VDIFhtrTMO1US40HRsLLhU7bwoSwqxBJt87MJdTQryWjSU5jUZQ7sOCuiFKELMjah0U5 QKEA== X-Gm-Message-State: AHPjjUhl8CvXd32yGS0ps7yggAa8su+EXCQtp+fKpN3m9uHNt1COX9LU yjTITEnqRG20BIUPxh3ZYltdYQ== X-Google-Smtp-Source: AOwi7QAPqlNPEdJme5rjGh569lQVV34jMjT+q5+nJoivxFaGwstBX+Yvi6mJ3HZcHF4XpA2f8qR0lA== X-Received: by 10.159.218.6 with SMTP id v6mr4542673plp.1.1505973460358; Wed, 20 Sep 2017 22:57:40 -0700 (PDT) Received: from calancha-pc ([103.5.140.166]) by smtp.gmail.com with ESMTPSA id d12sm963400pgn.53.2017.09.20.22.57.39 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Sep 2017 22:57:39 -0700 (PDT) Date: Thu, 21 Sep 2017 14:57:33 +0900 Message-Id: <87shfgr3ua.fsf@gmail.com> To: control@debbugs.gnu.org From: Tino Calancha Subject: control message for bug #28529 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) tags 28529 fixed close 28529 26.0.60 From unknown Fri Jun 20 20:08:13 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 19 Oct 2017 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator