From: Michael Albinus Date: Mon, 5 Nov 2018 13:31:07 +0000 (+0100) Subject: Fix Bug#33135 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=80da4fa750df11769c1625d514ddb20b070aa3b7;p=emacs.git Fix Bug#33135 * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler): Support threads. (Bug#33135) --- diff --git a/lisp/net/tramp-ftp.el b/lisp/net/tramp-ftp.el index 983f168ddb4..b1650f0c5ac 100644 --- a/lisp/net/tramp-ftp.el +++ b/lisp/net/tramp-ftp.el @@ -131,7 +131,16 @@ pass to the OPERATION." ;; "ftp" method is used in the Tramp file name. So we unset ;; those values. (ange-ftp-ftp-name-arg "") - (ange-ftp-ftp-name-res nil)) + (ange-ftp-ftp-name-res nil) + (v (tramp-dissect-file-name + (apply 'tramp-file-name-for-operation operation args) t))) + (setf (tramp-file-name-method v) tramp-ftp-method) + ;; Set "process-name" for thread support. + (tramp-set-connection-property + v "process-name" + (ange-ftp-ftp-process-buffer + (tramp-file-name-host v) (tramp-file-name-user v))) + (cond ;; If argument is a symlink, `file-directory-p' and ;; `file-exists-p' call the traversed file recursively. So we @@ -143,9 +152,7 @@ pass to the OPERATION." ;; "~/.netrc". ((memq operation '(file-directory-p file-exists-p)) (if (apply 'ange-ftp-hook-function operation args) - (let ((v (tramp-dissect-file-name (car args) t))) - (setf (tramp-file-name-method v) tramp-ftp-method) - (tramp-set-connection-property v "started" t)) + (tramp-set-connection-property v "started" t) nil)) ;; If the second argument of `copy-file' or `rename-file' is a