GNU bug report logs - #28483
26.0.50; copy-directory does not create directories

Previous Next

Package: emacs;

Reported by: Aaron Jensen <aaronjensen <at> gmail.com>

Date: Sun, 17 Sep 2017 19:12:02 UTC

Severity: normal

Found in version 26.0.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #34 received at 28483 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 28483 <at> debbugs.gnu.org, aaronjensen <at> gmail.com
Subject: Re: bug#28483: 26.0.50; copy-directory does not create directories
Date: Wed, 20 Sep 2017 14:26:56 +0300
> From: Paul Eggert <eggert <at> 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.





This bug report was last modified 7 years and 245 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.