From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#28483: 26.0.50; copy-directory does not create directories Date: Wed, 20 Sep 2017 14:26:56 +0300 Message-ID: <83mv5pfw5b.fsf@gnu.org> References: <972c8b3c-f72d-d447-78b3-cc7fcf6234e5@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1505922757 1701 195.159.176.226 (20 Sep 2017 15:52:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 20 Sep 2017 15:52:37 +0000 (UTC) Cc: 28483@debbugs.gnu.org, aaronjensen@gmail.com To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 20 17:52:33 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duhIf-0000FS-5u for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Sep 2017 17:52:33 +0200 Original-Received: from localhost ([::1]:49107 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duhIm-0001BC-EQ for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Sep 2017 11:52:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32880) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dughC-0002HB-Hz for bug-gnu-emacs@gnu.org; Wed, 20 Sep 2017 11:14:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dugfT-0003V1-H2 for bug-gnu-emacs@gnu.org; Wed, 20 Sep 2017 11:13:50 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41610) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dugfT-0003UY-D0 for bug-gnu-emacs@gnu.org; Wed, 20 Sep 2017 11:12:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dugfT-000450-3C for bug-gnu-emacs@gnu.org; Wed, 20 Sep 2017 11:12:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Sep 2017 15:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28483 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28483-submit@debbugs.gnu.org id=B28483.150592029815652 (code B ref 28483); Wed, 20 Sep 2017 15:12:02 +0000 Original-Received: (at 28483) by debbugs.gnu.org; 20 Sep 2017 15:11:38 +0000 Original-Received: from localhost ([127.0.0.1]:50291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dugf4-00044O-9q for submit@debbugs.gnu.org; Wed, 20 Sep 2017 11:11:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dugf1-00044A-MB for 28483@debbugs.gnu.org; Wed, 20 Sep 2017 11:11:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duge5-0002CE-Sv for 28483@debbugs.gnu.org; Wed, 20 Sep 2017 11:11:30 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41780) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dugct-00087K-Ft; Wed, 20 Sep 2017 11:09:23 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3300 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dud9l-00070N-Pr; Wed, 20 Sep 2017 07:27:06 -0400 In-reply-to: <972c8b3c-f72d-d447-78b3-cc7fcf6234e5@cs.ucla.edu> (message from Paul Eggert on Sun, 17 Sep 2017 13:40:45 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:137175 Archived-At: > From: Paul Eggert > Date: Sun, 17 Sep 2017 13:40:45 -0700 > > The recent security patch to copy-directory had the unintended side effect of > refusing to make the destination directory when COPY-CONTENTS is non-nil and > when the destination is a directory name. Sorry about that. I installed a patch > in the emacs-26 branch, here: > > http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-26&id=37b5e661d298cbfe51422cd515b6696a1cdaa868 > > Please give it a try. As I think it fixes the bug, I'm boldly closing this bug > report; we can reopen it if I'm wrong. Thanks. I still see a problem in copy-directory if I modify the original recipe slightly: by having the directory ~/test2/a empty (in the original recipe it included one file. ~/test2/a/e). If that directory is empty, it is not copied to the destination. Moreover, the logic in copy-directory transfers the modes and timestamp of the (not-copied) directory to the destination directory, not to the copy. 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.