GNU bug report logs - #28519
26.0.50; Dired move of directory across partition boundary fails

Previous Next

Package: emacs;

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

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

Severity: normal

Tags: fixed

Merged with 28792, 28828

Found in versions 26.0.50, 26.0.60, 27.0.50

Fixed in version 26.1

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28519 in the body.
You can then email your comments to 28519 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#28519; Package emacs. (Tue, 19 Sep 2017 22:44:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to adam plaice <plaice.adam+lists <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 19 Sep 2017 22:44:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: adam plaice <plaice.adam+lists <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50; Dired move of directory across partition boundary fails
Date: Tue, 19 Sep 2017 23:31:21 +0100
Moving a directory, with dired ("R"), across a partition boundary fails.

To reproduce:

mkdir test_dired_move/a -p
cd test_dired_move
emacs -Q --eval '(dired ".")'

In dired, execute `dired-do-rename' (kbd "R") on the `a' directory and
select a (writable) destination on a different partition, if such exists
(typically /media/... or /mnt/... on a unix system).

*Dired log* contains (in my specific case):


Move ‘/home/adam/test_dired_move/a’ to ‘/mnt/data/a’ failed:
(file-error Non-regular file Is a directory /home/adam/test_dired_move/a)

Move failed for 1 of 1 file


I think (though I'm not 100% certain) that the problem can be traced to
rename-file, since the following elisp fails as well (with the exact
same file-error):

(rename-file "/home/adam/test_dired_move/a" "/mnt/data/a")



The regression occurred in the commit range
52739ffe773eb403f58a6223b7ef64175df58dd7..e22794867d878d53675fcc91d2ef1ad2494a2ff2
(I have not had time to rebuild emacs sufficiently many times and
check which exact commit is responsible). Since
01c885f21f343045783eb9ad1ff5f9b83d6cd789 touches src/fileio.c I
presume that it would be this one.


Moving a directory on the same partition works as expected. Moving a
plain file to another partition also works normally.


The bug is present in the heads of both the emacs-26
(4bef92e9e02d074de1d92e30dc5ef4dd62558c80) and master
(b1f83c10df7d1bbb16f4e13d18119ad4aa1a2137) branches.

Thank you for reading and spending your time on emacs!
Adam

In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2017-09-13 built on adam
Repository revision: 4bef92e9e02d074de1d92e30dc5ef4dd62558c80
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description:    Ubuntu 16.04.3 LTS

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --with-modules --without-pop'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES LIBSYSTEMD LCMS2

Important settings:
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Dired by name

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-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
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message subr-x puny cl-macs seq byte-opt
gv bytecomp byte-compile cconv format-spec rfc822 mml easymenu mml-sec
password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils dired-aux cl-loaddefs cl-lib dired dired-loaddefs elec-pair
time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type 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 elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame 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 charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 100826 7691)
 (symbols 48 20537 1)
 (miscs 40 52 193)
 (strings 32 28786 1222)
 (string-bytes 1 745696)
 (vectors 16 15163)
 (vector-slots 8 497313 9957)
 (floats 8 48 124)
 (intervals 56 824 11)
 (buffers 992 15)
 (heap 1024 24906 1131))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28519; Package emacs. (Sun, 24 Sep 2017 19:11:02 GMT) Full text and rfc822 format available.

Message #8 received at 28519 <at> debbugs.gnu.org (full text, mbox):

From: adam plaice <plaice.adam+lists <at> gmail.com>
To: 28519 <at> debbugs.gnu.org
Subject: 26.0.50; Dired move of directory across partition boundary fails
Date: Sun, 24 Sep 2017 20:10:40 +0100
It seems that a very similar problem occurs when trying to move a
directory using tramp to a remote system (with ssh/scp).


To reproduce:

Open a directory in dired,
With point over a subdirectory, press R to "rename" it,
As the destination, select a directory on a remote filesystem (with
tramp).


Expected behaviour:

The subdirectory is moved to the destination.


Actual behaviour:

Nothing happens, with sample error message:

Renaming /local/path/directory to
/ssh:username <at> hostname:/path/to/directory...failed Move
‘/local/path/directory’ to
‘/ssh:username <at> hostname:/path/to/directory’ failed: (file-error Read
error Is a directory /local/path/directory)

(Details redacted for privacy.)



Moving a file (rather than a directory) works normally.

I assume that the underlying issue is the same as above, so I'm not
filing a separate bug.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28519; Package emacs. (Sun, 24 Sep 2017 23:26:02 GMT) Full text and rfc822 format available.

Message #11 received at 28519 <at> debbugs.gnu.org (full text, mbox):

From: John Wiegley <jwiegley <at> gmail.com>
To: adam plaice <plaice.adam+lists <at> gmail.com>
Cc: 28519 <at> debbugs.gnu.org
Subject: Re: bug#28519: 26.0.50;
 Dired move of directory across partition boundary fails
Date: Sun, 24 Sep 2017 16:06:32 -0700
>>>>> "ap" == adam plaice <plaice.adam+lists <at> gmail.com> writes:

ap> Moving a file (rather than a directory) works normally.

ap> I assume that the underlying issue is the same as above, so I'm not filing
ap> a separate bug.

Does this also happen with Emacs 25?  I'm wondering if it's related to a
recent security cleanup in the implementation of rename.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28519; Package emacs. (Mon, 25 Sep 2017 13:31:02 GMT) Full text and rfc822 format available.

Message #14 received at 28519 <at> debbugs.gnu.org (full text, mbox):

From: Adam Plaice <plaiceadam <at> gmail.com>
To: John Wiegley <jwiegley <at> gmail.com>
Cc: 28519 <at> debbugs.gnu.org
Subject: Re: bug#28519: 26.0.50; Dired move of directory across partition
 boundary fails
Date: Mon, 25 Sep 2017 14:30:30 +0100
I was overly hasty in assuming that the issue with moving directories
to a remote tramp directory is the same as the above bug (with moving
to a different partition).

The former (the "tramp bug") is present in 25.1 — it's also present in
24.5 and 23.4. The latter (the above "different partition bug") is not
present in 25.1 or earlier (it was introduced after
52739ffe773eb403f58a6223b7ef64175df58dd7).

I currently don't have much time, but I will file a proper bug report
for the "tramp bug" when I have some.


(I have tested the "tramp bug" on several different machines (as both
the "source" and the "remote"), with emacs -Q, but they were all
Ubuntu 16.04, so if I were to speculate, it's quite possible that the
bug was introduced by changes in the underlying system
libraries/programs.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28519; Package emacs. (Fri, 20 Oct 2017 17:21:02 GMT) Full text and rfc822 format available.

Message #17 received at 28519 <at> debbugs.gnu.org (full text, mbox):

From: Adam Plaice <plaiceadam <at> gmail.com>
To: John Wiegley <jwiegley <at> gmail.com>
Cc: 28519 <at> debbugs.gnu.org
Subject: Re: bug#28519: 26.0.50; Dired move of directory across partition
 boundary fails
Date: Fri, 20 Oct 2017 18:20:19 +0100
I think that this bug is a duplicate of #28792, which is fixed.

(In any case, as of b500e06f4d05dc094b79f8f2c063e070a5a3306e on
emacs-26, the issue is resolved. I think the actual fix is
2f4bd2fbdaccbaa61fe9b5adb56ba9e8f3d49505.)

Thanks!
Adam




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28519; Package emacs. (Sat, 21 Oct 2017 00:42:02 GMT) Full text and rfc822 format available.

Message #20 received at 28519 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Adam Plaice <plaiceadam <at> gmail.com>
Cc: John Wiegley <jwiegley <at> gmail.com>, 28519 <at> debbugs.gnu.org
Subject: Re: bug#28519: 26.0.50;
 Dired move of directory across partition boundary fails
Date: Fri, 20 Oct 2017 20:41:25 -0400
tags 28792 fixed
close 28792 26.1
merge 28519 28792
quit

Adam Plaice <plaiceadam <at> gmail.com> writes:

> I think that this bug is a duplicate of #28792, which is fixed.
>
> (In any case, as of b500e06f4d05dc094b79f8f2c063e070a5a3306e on
> emacs-26, the issue is resolved. I think the actual fix is
> 2f4bd2fbdaccbaa61fe9b5adb56ba9e8f3d49505.)
>
> Thanks!
> Adam

Closing.




Added tag(s) fixed. Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Sat, 21 Oct 2017 00:47:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 26.1, send any further explanations to 28519 <at> debbugs.gnu.org and adam plaice <plaice.adam+lists <at> gmail.com> Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Sat, 21 Oct 2017 00:47:02 GMT) Full text and rfc822 format available.

Merged 28519 28792 28828. Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Sat, 21 Oct 2017 00:47:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 18 Nov 2017 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 160 days ago.

Previous Next


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