Subject: bug#28520: 26.0.50; Dired recursive copy of directory fails

From: Tino Calancha <[email-masked]>
Date: Wed, 20 Sep 2017 17:33:49 +0900

adam plaice <[email-masked]> writes:

> Copying a directory recursively, with dired ("C"), fails.
>
> To reproduce:
>
> mkdir test_dired_copy/a1/b -p
> cd test_dired_copy
> emacs -Q --eval '(dired ".")'
>
> In dired, execute `dired-do-copy' (kbd "C") on the `a1' directory,
> select `a2' (within the same parent directory) as the destination, and
> answer `yes' to (`Recursive copies of ...?').
>
> *Dired log* contains (in my specific case):
>
>
> Copy ‘/home/adam/test_dired_copy/a1’ to ‘/home/adam/test_dired_copy/a2’ failed:
> (file-already-exists File exists /home/adam/test_dired_copy/a2)
>
> Copy failed for 1 of 1 file
>
>
> The result is that the directory `a2' is created, but the subdirectory
> `b' is not created within it. (For repeated testing, `a2' has to be
> deleted each time.)
Thank you for the report.
It seems the bug started with commit:
Make copy-directory act like copy-file etc. (e22794867d8)