all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#31941: 26.1; Moving directory on remote host via tramp scp always performs copy
@ 2018-06-22 19:33 Stephen Nutt
  2018-06-24  8:31 ` Michael Albinus
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Nutt @ 2018-06-22 19:33 UTC (permalink / raw)
  To: 31941

In Emacs 26, when moving a directory within a remote host over Tramp
using the scp method (e.g. with dired-do-rename or mv in eshell), a copy
and delete are always performed, even when a much simpler mv would
suffice. The behavior is the same when running emacs with -q or with
emacs built from master. This is a regression from the behavior in 25.3.

I think I've isolated the change to the commit b500e0 where the
following was added at the beginning of `tramp-do-copy-or-rename-file'
in tramp-sh.el to explicitly call `copy-directory'.

  (if (file-directory-p filename)
      (progn
	(copy-directory filename newname keep-date t)
	(when (eq op 'rename) (delete-directory filename 'recursive)))

I think the conditional should also check if op is a rename and if the
remote of filename and newname are the same, in which case the normal
behavior of the function should proceed which should result in a mv
command.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-06-25  6:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-22 19:33 bug#31941: 26.1; Moving directory on remote host via tramp scp always performs copy Stephen Nutt
2018-06-24  8:31 ` Michael Albinus
2018-06-24 12:06   ` Stephen Nutt
2018-06-25  6:43     ` Michael Albinus

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.