bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28483: 26.0.50; copy-directory does not create directories


From: Paul Eggert
Subject: bug#28483: 26.0.50; copy-directory does not create directories
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

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.

Attachment: 0001-Fix-new-copy-directory-bug-with-empty-dirs.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]