GNU bug report logs - #58918
28.2; Copying files in dired

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Skyler Mayfield <skyler544@HIDDEN>; merged with #58919; dated Mon, 31 Oct 2022 08:15:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Merged 58918 58919. Request was from Eli Zaretskii <eliz@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 31 Oct 2022 08:14:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 31 04:14:18 2022
Received: from localhost ([127.0.0.1]:39435 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1opPw1-0008DK-MG
	for submit <at> debbugs.gnu.org; Mon, 31 Oct 2022 04:14:18 -0400
Received: from lists.gnu.org ([209.51.188.17]:45764)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <skyler544@HIDDEN>) id 1opPBV-00072M-Pu
 for submit <at> debbugs.gnu.org; Mon, 31 Oct 2022 03:26:25 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <skyler544@HIDDEN>)
 id 1opPBU-0004Yb-Hm
 for bug-gnu-emacs@HIDDEN; Mon, 31 Oct 2022 03:26:13 -0400
Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <skyler544@HIDDEN>)
 id 1opPBS-0002V9-8N
 for bug-gnu-emacs@HIDDEN; Mon, 31 Oct 2022 03:26:11 -0400
Received: by mail-ej1-x62d.google.com with SMTP id 13so27240693ejn.3
 for <bug-gnu-emacs@HIDDEN>; Mon, 31 Oct 2022 00:26:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:message-id:date:subject:to:from:user-agent:from:to:cc
 :subject:date:message-id:reply-to;
 bh=LGEK+fQt57x+uMElVSM/NrB8whePrgBEDPcE7GQyuCg=;
 b=peUGmT3Iqw63MemoTemJBp2RnG5a3G2YGVw0m5rDuS4vCLG2aygXMN/Q8vIFd+ezNY
 vrrYcil0c6dkvWeK4feYTINP+9VY1vOSSaSoQ1PlsjruM/4S9Nd68cpby+2j1/8GBk6p
 6bg5klwMDkb92CW5TqJOVaOAZHSiDPpWpVhZGtafy6/8jyl8tAXurCVGCsKoc8W2euZe
 ZtpseK8Y53itGOv13SFHuxQnlhFYPprqzALAfEB+yozhgudTXcnD1GtDN40jRY7DhM7G
 pR//JaehJT9BHOAOTNKX0AxNd5aqul8fUwYT+ZQhTTH/KurdlIaHEww9h1Iug0jkZKzw
 v0lg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=mime-version:message-id:date:subject:to:from:user-agent
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=LGEK+fQt57x+uMElVSM/NrB8whePrgBEDPcE7GQyuCg=;
 b=X9kX8ZYHMZtri3iOJzLUItl3U14Qkqh1pQFj8r+SxH0alqFiZRrDZnIx4v2fBBaCtV
 /BRXizH3C3R+VGSORozFRsRDFxXwo8/ErTMsyv5xLCVRLX+MxJB4zE0kPwMBqT6D+slG
 Sqftkmaexd4eyBbdg2dQFLb31EZl0k18brIEPgxzlsX3aJQayi6ffmDjlyqkAFRVXr45
 uXs7qDxlTpUch8UPZpkoWdsWKnSYVesE8x5aSR/D0Cq5APG2b5dMpXD+tDcva81wol8O
 PC2xMWe0r78rRN+MQ0h5h44aZEXihBDeI50DJOhf0+7nEgTvGSqOgJ8yPmrG9+ekhdmn
 mNUA==
X-Gm-Message-State: ACrzQf2oZ5u/n/h/s7E8FNFWJ/v+6bLwqlkBRvyPCdZ437MDAbd+/Jf0
 WdHVhuXWNiBzffJFyLuOpNY=
X-Google-Smtp-Source: AMsMyM7VMyVc4XkFmSLzELqeI4kmtS1zMgHLxPmJft7HKxOekgn492oMmic0CjkToZPMgEokhcPNaA==
X-Received: by 2002:a17:907:1c8a:b0:782:1a0d:3373 with SMTP id
 nb10-20020a1709071c8a00b007821a0d3373mr11010490ejc.135.1667201166427; 
 Mon, 31 Oct 2022 00:26:06 -0700 (PDT)
Received: from void (84-115-217-197.cable.dynamic.surfer.at. [84.115.217.197])
 by smtp.gmail.com with ESMTPSA id
 f15-20020a17090631cf00b007a03313a78esm2651225ejf.20.2022.10.31.00.26.03
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 31 Oct 2022 00:26:04 -0700 (PDT)
User-agent: mu4e 1.8.10; emacs 28.2
From: Skyler Mayfield <skyler544@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 28.2; Copying files in dired
Date: Mon, 31 Oct 2022 08:25:27 +0100
Message-ID: <878rkw8nin.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed
Received-SPF: pass client-ip=2a00:1450:4864:20::62d;
 envelope-from=skyler544@HIDDEN; helo=mail-ej1-x62d.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.1 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Mon, 31 Oct 2022 04:14:15 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)



I've discovered what seems might be a bug in the functions 
dired-do-copy
and dired-do-rename. Copying or renaming files fails when 
attempting to
merge directories. Consider the following:

1. Start emacs via emacs -Q
2. Navigate with dired to some safe, user-writable directory, such 
as
your home directory.
3. Create two directories called testA and testB, with
dired-create-directory for instance.
4. Inside ~/testA create another subdirectory called
foo.
5. Create a file ~/testA/foo/bar and enter
some example text.
6. In a dired buffer visiting ~/testA, mark the foo directory.
7. Copy the directory to the other directory, via dired-do-copy. 
This
should prompt for a destination, ~/testA/ by default, so press 
backspace
twice and complete the destination to ~/testB/ and press enter.
8. Now modify the file ~/testB/foo/bar and save it. (This step is
actually optional as the outcome won't change either way.)
9. Switch back to the dired buffer visiting ~/testA/ and attempt 
to copy
the foo directory to ~/testB/ again as in step 7.
10. You will be prompted to overwrite, press y or ! here to do so. 
Now
you should be prompted to copy recursively, so type in yes and 
press
enter.
11. The command fails with the error: Copy: 
'/home/clock/testA/foo' to '/home/clock/testB/' failed:
(file-already-exists File exists /home/clock/testB/foo)

My expectation here is that dired would recurse into the foo 
directory,
and in the case that you have pressed y, it should ask if you 
would like
to overwrite the file bar, and if you have pressed !, you 
shouldn't be
prompted and the file should be overwritten. Furthermore, if the
contents of ~/testA/foo differ further, with more subdirectories 
and
files, those files should all be copied over as with the behavior 
of cp
-r in bash. If you perform these same steps up to step 9, but in 
 step 9
you use dired-do-rename, the resulting error changes to this: 
Move: '/home/clock/testA/foo' to '/home/clock/testB/foo' failed:
(file-error Renaming Directory not empty /home/clock/testA/foo 
/home/clock/testB/foo)


In GNU Emacs 28.2 (build 2, x86_64-unknown-linux-gnu, GTK+ Version 
3.24.34, cairo version 1.16.0)
 of 2022-09-13 built on a-fsn-de
Windowing system distributor 'The X.Org Foundation', version 
11.0.12101004
System Description: Void Linux

Configured using:
 'configure --with-x-toolkit=gtk3 --with-xwidgets --prefix=/usr
 --sysconfdir=/etc --sbindir=/usr/bin --bindir=/usr/bin
 --mandir=/usr/share/man --infodir=/usr/share/info 
 --localstatedir=/var
 --host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu
 '--libdir=${exec_prefix}/lib64' --with-file-notification=inotify
 --with-modules --with-jpeg --with-tiff --with-gif --with-png 
 --with-xpm
 --with-rsvg --without-imagemagick --with-xml2 --with-gnutls
 --with-sound --with-m17n-flt --with-json --with-harfbuzz 
 --with-cairo
 --with-libgmp --with-native-compilation 'CFLAGS=-fno-PIE 
 -mtune=generic
 -O2 -pipe -g -fdebug-prefix-map=/builddir/emacs-28.2=.' 
 'CPPFLAGS= '
 'LDFLAGS=-no-pie -Wl,--as-needed ''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ 
JPEG JSON
LCMS2 LIBOTF LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY 
PDUMPER
PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE 
XIM XPM
XWIDGETS GTK3 ZLIB

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired 
dired-loaddefs
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util 
rmail
rmail-loaddefs auth-source eieio eieio-core eieio-loaddefs
password-cache json map text-property-search mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader 
sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils apropos 
comp
comp-cstr warnings rx cl-seq cl-macs cl-extra help-mode seq 
byte-opt gv
bytecomp byte-compile cconv time-date subr-x cl-loaddefs cl-lib
iso-transl tooltip eldoc paren electric uniquify ediff-hook 
vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win 
x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list 
replace
newcomment text-mode lisp-mode prog-mode register page tab-bar 
menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse 
jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer 
cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai 
tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak 
czech
european ethiopic indian cyrillic chinese composite emoji-zwj 
charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev 
obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env 
code-pages
mule custom widget hashtable-print-readable backquote threads
xwidget-internal dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting cairo move-toolbar gtk 
x-toolkit
x multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 89023 9463)
 (symbols 48 7940 1)
 (strings 32 23961 4125)
 (string-bytes 1 841821)
 (vectors 16 18290)
 (vector-slots 8 337377 23668)
 (floats 8 32 33)
 (intervals 56 307 0)
 (buffers 992 13))




Acknowledgement sent to Skyler Mayfield <skyler544@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#58918; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 31 Oct 2022 13:15:01 UTC

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