From: Warren Lynn <wrn.lynn@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 21562@debbugs.gnu.org
Subject: bug#21562: 24.5; Copy dir via Tramp pscp does not work
Date: Fri, 2 Oct 2015 10:35:16 -0400 [thread overview]
Message-ID: <CAMyoMRVagO=Fvmc1mu=xx2AzMphB4f+Y3AtnpF4Tof03-yDs7w@mail.gmail.com> (raw)
In-Reply-To: <878u7tk0bm.fsf@gmx.de>
[-- Attachment #1.1: Type: text/plain, Size: 1376 bytes --]
I found the cause and have a fix for it. Attached is the patch (on top of
Emacs 24.5.1).:
The cause is the order of the function "shell-quote-argument" and
"file-name-nondirectory" is wrong. So if I have a target directory name
"c:\wlynn\tmp\xyz", the buggy code will first quote it into
"\"c:\wlynn\tmp\xyz\"", and the file-name-nondirectory function will strip
the last part, ending with something like this:
"\"c:\wlynn\tmp"
See the dangling leading quote?
I verified that it works now. Let me know if you think the patch is good
and is merged into the latest dev branch. Thanks.
On Sat, Sep 26, 2015 at 5:16 AM, Michael Albinus <michael.albinus@gmx.de>
wrote:
> Warren Lynn <wrn.lynn@gmail.com> writes:
>
> > I use dired/tramp to view a directory on a remote machine (Linux) with
> > pscp method, and if I do a copy (recursively) of a remote dir to
> > either a local or another remote dir with command dired-to-copy, it
> > fails (after entering the password) with the following message in the
> > minibuffer:
> >
> > ============================================
> > Tramp failed to connect. If this happens repeatedly try 'M-x
> > tramp-cleanup-this-connection'
> > ============================================
>
> Please apply (setq tramp-verbose 6) prior to your test. Rerun the test,
> and show us the resulting Tramp debug buffer.
>
> Best regards, Michael.
>
[-- Attachment #1.2: Type: text/html, Size: 1960 bytes --]
[-- Attachment #2: emacs-bug-21562-fix.patch --]
[-- Type: application/octet-stream, Size: 831 bytes --]
--- c:/wlin/bin/emacs-24.5/share/emacs/24.5/lisp/net/tramp-sh.el.orig 2015-04-02 03:23:06.000000000 -0400
+++ c:/wlin/bin/emacs-24.5/share/emacs/24.5/lisp/net/tramp-sh.el 2015-10-02 10:28:33.304130400 -0400
@@ -2292,7 +2292,8 @@
(setq source (if t1
(tramp-make-copy-program-file-name v)
(shell-quote-argument filename))
- target (funcall
+ target (shell-quote-argument
+ (funcall
(if (and (file-directory-p filename)
(string-equal
(file-name-nondirectory filename)
@@ -2301,7 +2302,7 @@
'identity)
(if t2
(tramp-make-copy-program-file-name v)
- (shell-quote-argument newname))))
+ newname))))
;; Check for host and port number. We cannot use
;; `tramp-file-name-port', because this returns also
next prev parent reply other threads:[~2015-10-02 14:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-25 18:29 bug#21562: 24.5; Copy dir via Tramp pscp does not work Warren Lynn
2015-09-26 9:16 ` Michael Albinus
2015-10-02 14:35 ` Warren Lynn [this message]
2015-10-02 16:16 ` Warren Lynn
2015-10-02 17:59 ` Michael Albinus
2015-10-10 10:07 ` Michael Albinus
[not found] ` <CAMyoMRVh72VVj9D7p5E17nMdVinA4NHDiGf4OcnW3=3_yuBf2w@mail.gmail.com>
2015-10-12 15:54 ` bug#21562: Fwd: " Warren Lynn
2015-10-13 8:33 ` Michael Albinus
2015-10-14 18:22 ` 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='CAMyoMRVagO=Fvmc1mu=xx2AzMphB4f+Y3AtnpF4Tof03-yDs7w@mail.gmail.com' \
--to=wrn.lynn@gmail.com \
--cc=21562@debbugs.gnu.org \
--cc=michael.albinus@gmx.de \
/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.