emacs-diffs
[Top][All Lists]
Advanced

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

emacs-29 d6fb868cdd3 1/2: Fix multihop file name expansion in Tramp


From: Michael Albinus
Subject: emacs-29 d6fb868cdd3 1/2: Fix multihop file name expansion in Tramp
Date: Mon, 22 May 2023 06:21:01 -0400 (EDT)

branch: emacs-29
commit d6fb868cdd33af642ff50c62d526d6b4cb44b6b6
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    Fix multihop file name expansion in Tramp
    
    * lisp/net/tramp.el (tramp-dissect-file-name): Set hop to nil if
    NODEFAULT.  (Bug#63578)
---
 lisp/net/tramp.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index df2f0850b83..dac2bc8c43c 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1681,8 +1681,9 @@ The structure consists of method, user, domain, host, 
port,
 localname (file name on remote host), and hop.
 
 Unless NODEFAULT is non-nil, method, user and host are expanded
-to their default values.  For the other file name parts, no
-default values are used."
+to their default values.  Hop is set to nil if NODEFAULT is non-nil.
+
+For the other file name parts, no default values are used."
   (save-match-data
     (unless (tramp-tramp-file-p name)
       (tramp-user-error nil "Not a Tramp file name: \"%s\"" name))
@@ -1708,7 +1709,8 @@ default values are used."
          (when (string-match tramp-postfix-ipv6-regexp host)
            (setq host (replace-match "" nil t host))))
 
-       (unless nodefault
+       (if nodefault
+           (setq hop nil)
          (when hop
            (setq v (tramp-dissect-hop-name hop)
                  hop (and hop (tramp-make-tramp-hop-name v))))



reply via email to

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