" -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))