all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 28483@debbugs.gnu.org, aaronjensen@gmail.com
Subject: bug#28483: 26.0.50; copy-directory does not create directories
Date: Wed, 20 Sep 2017 14:26:56 +0300	[thread overview]
Message-ID: <83mv5pfw5b.fsf@gnu.org> (raw)
In-Reply-To: <972c8b3c-f72d-d447-78b3-cc7fcf6234e5@cs.ucla.edu> (message from Paul Eggert on Sun, 17 Sep 2017 13:40:45 -0700)

> From: Paul Eggert <eggert@cs.ucla.edu>
> 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.






  parent reply	other threads:[~2017-09-20 11:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-17 19:10 bug#28483: 26.0.50; copy-directory does not create directories Aaron Jensen
2017-09-17 19:15 ` bug#28483: [PATCH] Fix copy-directory creating missing directory Aaron Jensen
2017-09-17 19:48   ` Philipp Stephani
2017-09-17 20:19     ` Aaron Jensen
2017-09-18 17:40       ` Philipp Stephani
2017-09-17 19:20 ` bug#28483: 26.0.50; copy-directory does not create directories Aaron Jensen
2017-09-17 20:40   ` Paul Eggert
2017-09-17 23:12     ` Aaron Jensen
2017-09-17 23:52       ` Paul Eggert
2017-09-20 11:26     ` Eli Zaretskii [this message]
2017-09-20 18:59       ` bug#28520: " Paul Eggert
2017-09-20 19:54         ` Eli Zaretskii
2017-09-20 23:04           ` Adam Plaice

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83mv5pfw5b.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=28483@debbugs.gnu.org \
    --cc=aaronjensen@gmail.com \
    --cc=eggert@cs.ucla.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.