emacs-diffs
[Top][All Lists]
Advanced

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

master b936ff0963e: Fix Tramp error on macOS


From: Michael Albinus
Subject: master b936ff0963e: Fix Tramp error on macOS
Date: Thu, 27 Jul 2023 03:33:08 -0400 (EDT)

branch: master
commit b936ff0963e69d30d77cec5323a95bc2385cf212
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    Fix Tramp error on macOS
    
    * lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options):
    Don't use an absolute ControlPath on macOS.  (Bug#64880)
---
 lisp/net/tramp-sh.el | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index f2cbb74acd2..3ab58c2722e 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4867,12 +4867,17 @@ Goes through the list `tramp-inline-compress-commands'."
          " -o ControlPath="
          (if (eq tramp-use-connection-share 'suppress)
              "none"
-           ;; Hashed tokens are introduced in OpenSSH 6.7.
-          (expand-file-name
-           (if (tramp-ssh-option-exists-p vec "ControlPath=tramp.%C")
-               "tramp.%%C" "tramp.%%r@%%h:%%p")
-           (or small-temporary-file-directory
-               tramp-compat-temporary-file-directory)))
+           ;; Hashed tokens are introduced in OpenSSH 6.7.  On macOS
+           ;; we cannot use an absolute file name, it is too long.
+           ;; See Bug#19702.
+          (if (eq system-type 'darwin)
+              (if (tramp-ssh-option-exists-p vec "ControlPath=tramp.%C")
+                  "tramp.%%C" "tramp.%%r@%%h:%%p")
+            (expand-file-name
+             (if (tramp-ssh-option-exists-p vec "ControlPath=tramp.%C")
+                 "tramp.%%C" "tramp.%%r@%%h:%%p")
+             (or small-temporary-file-directory
+                 tramp-compat-temporary-file-directory))))
 
          ;; ControlPersist option is introduced in OpenSSH 5.6.
         (when (and (not (eq tramp-use-connection-share 'suppress))



reply via email to

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