Fix Bug#33141

* lisp/net/tramp.el (tramp-make-tramp-file-name): Avoid check for
empty method with simplified `tramp-syntax'.  (Bug#33141)
This commit is contained in:
Michael Albinus 2018-10-24 20:56:40 +02:00
parent 129ffc2761
commit f1f1687fcd
2 changed files with 6 additions and 1 deletions

View file

@ -269,4 +269,7 @@ A nil value for either argument stands for the current time."
;;; TODO:
;; * When we get rid of Emacs 24, replace "(mapconcat 'identity" by
;; "(string-join".
;;; tramp-compat.el ends here

View file

@ -1439,7 +1439,9 @@ the form (METHOD USER DOMAIN HOST PORT LOCALNAME &optional HOP)."
localname (nth 5 args)
hop (nth 6 args))))
(when (zerop (length method))
;; Unless `tramp-syntax' is `simplified', we need a method.
(when (and (not (zerop (length tramp-postfix-method-format)))
(zerop (length method)))
(signal 'wrong-type-argument (list 'stringp method)))
(concat tramp-prefix-format hop
(unless (zerop (length tramp-postfix-method-format))