emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] feature/tramp-thread-safe 80da4fa 1/2: Fix Bug#33135


From: Michael Albinus
Subject: [Emacs-diffs] feature/tramp-thread-safe 80da4fa 1/2: Fix Bug#33135
Date: Mon, 5 Nov 2018 08:41:04 -0500 (EST)

branch: feature/tramp-thread-safe
commit 80da4fa750df11769c1625d514ddb20b070aa3b7
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Fix Bug#33135
    
    * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler): Support threads.
    (Bug#33135)
---
 lisp/net/tramp-ftp.el | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/lisp/net/tramp-ftp.el b/lisp/net/tramp-ftp.el
index 983f168..b1650f0 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



reply via email to

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