GNU bug report logs - #28520
26.0.50; Dired recursive copy of directory fails

Previous Next

Package: emacs;

Reported by: adam plaice <plaice.adam+lists <at> gmail.com>

Date: Tue, 19 Sep 2017 22:44:04 UTC

Severity: normal

Tags: confirmed, fixed

Merged with 28529

Found in version 26.0.50

Fixed in version 26.0.60

Done: Tino Calancha <tino.calancha <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #15 received at 28520-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 28483 <at> debbugs.gnu.org, Adam Plaice <plaice.adam+lists <at> gmail.com>,
 28520-done <at> debbugs.gnu.org, aaronjensen <at> gmail.com,
 Tino Calancha <tino.calancha <at> gmail.com>
Subject: Re: bug#28483: 26.0.50; copy-directory does not create directories
Date: Wed, 20 Sep 2017 11:59:37 -0700
[Message part 1 (text/plain, inline)]
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.

[0001-Fix-new-copy-directory-bug-with-empty-dirs.patch (text/x-patch, attachment)]

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

Previous Next


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