bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31941: 26.1; Moving directory on remote host via tramp scp always pe


From: Michael Albinus
Subject: bug#31941: 26.1; Moving directory on remote host via tramp scp always performs copy
Date: Sun, 24 Jun 2018 10:31:35 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stephen Nutt <stnutt@gmail.com> writes:

Hi Stephen,

> 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.

Thanks for the bug report. I've fixed this in the emacs-26 branch of the
repository, will appear with Emacs 26.2.

The patch will be also part of Tramp 2.3.4, which is scheduled for
release next week.

The patch is appended, pls check whether it works for you.

Best regards, Michael.

Attachment: txtfCgob5CcgN.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]