From: Thierry Volpiatto <thievol@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 58919@debbugs.gnu.org, Paul Eggert <eggert@cs.ucla.edu>
Subject: bug#58919: 28.2; dired-copy-file-recursive fails to overwrite directory
Date: Tue, 01 Nov 2022 17:34:08 +0000 [thread overview]
Message-ID: <8735b2r1ye.fsf@posteo.net> (raw)
In-Reply-To: <83wn8gdu4k.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 2276 bytes --]
For people using dired-async.el (from emacs-async package) here how to
fix this bug temporarily until fixed:
https://github.com/jwiegley/emacs-async/issues/158
Eli Zaretskii <eliz@gnu.org> writes:
> merge 58919 58918
> thanks
>
>> From: Thierry Volpiatto <thievol@posteo.net>
>> Date: Mon, 31 Oct 2022 08:54:28 +0000
>>
>>
>> This is a followup of this report on reddit:
>> https://www.reddit.com/r/emacs/comments/yha104/merging_directories_in_dired_am_i_doing_it_wrong/
>
> Which was already reported as bug#58918...
>
>> When using dired-copy to copy a directory to another directory
>> containing a directory with the same name overwriting fails.
>> e.g. copy ~/tmp/test/foo/ to ~/tmp/test1/ fails when test1 contain foo/
>>
>> The bug is IMHO in copy-directory 3th clause of this cond:
>>
>> (cond ((not (directory-name-p newname))
>> ;; If NEWNAME is not a directory name, create it;
>> ;; that is where we will copy the files of DIRECTORY.
>> (make-directory newname parents))
>> ;; NEWNAME is a directory name. If COPY-CONTENTS is non-nil,
>> ;; create NEWNAME if it is not already a directory;
>> ;; otherwise, create NEWNAME/[DIRECTORY-BASENAME].
>> ((if copy-contents
>> (or parents (not (file-directory-p newname)))
>> (setq newname (concat newname
>> (file-name-nondirectory directory))))
>> (make-directory (directory-file-name newname) parents))
>> (t (setq follow t)))
>>
>> This change was introduced here:
>>
>> commit 047f02f00f602b9aef63ae8938e12f3f0ab481eb
>> Author: Paul Eggert <eggert@cs.ucla.edu>
>> Date: Wed Sep 20 11:49:12 2017 -0700
>>
>> Fix new copy-directory bug with empty dirs
>>
>> Problem reported by Afdam Plaice (Bug#28520) and by Eli Zaretskii
>> (Bug#28483#34). This is another bug that I introduced in my
>> recent copy-directory changes.
>> * lisp/files.el (copy-directory): Work with empty subdirectories, too.
>> * test/lisp/files-tests.el (files-tests--copy-directory):
>> Test for this bug.
>>
>> Reverting this change fix the bug.
>
> Paul, could you please look into this?
>
> I think this also affects bug#58721.
>
> Thanks.
--
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 686 bytes --]
next prev parent reply other threads:[~2022-11-01 17:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-31 8:54 bug#58919: 28.2; dired-copy-file-recursive fails to overwrite directory Thierry Volpiatto
2022-10-31 13:01 ` Eli Zaretskii
2022-11-01 17:34 ` Thierry Volpiatto [this message]
2022-11-01 18:04 ` Paul Eggert
2022-11-01 18:09 ` Eli Zaretskii
2022-11-01 19:21 ` Michael Albinus
2022-12-11 10:46 ` Eli Zaretskii
2022-12-16 23:22 ` Paul Eggert
2022-12-17 8:04 ` Eli Zaretskii
2022-12-17 9:52 ` Michael Albinus
2022-12-17 10:40 ` Eli Zaretskii
2022-12-17 22:40 ` Paul Eggert
2022-12-18 19:35 ` Michael Albinus
2022-12-18 20:54 ` Paul Eggert
2022-12-23 10:26 ` Michael Albinus
2022-12-24 9:11 ` Paul Eggert
2022-12-24 10:13 ` Michael Albinus
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=8735b2r1ye.fsf@posteo.net \
--to=thievol@posteo.net \
--cc=58919@debbugs.gnu.org \
--cc=eggert@cs.ucla.edu \
--cc=eliz@gnu.org \
/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.