diff --git a/lisp/tramp.el b/lisp/tramp.el index d9db17ea..f97ed66c 100644 --- a/lisp/tramp.el +++ b/lisp/tramp.el @@ -3594,8 +3594,7 @@ that a stederr file is supported. BODY is the backend specific code." (not (tramp-equal-remote default-directory stderr))) (signal 'file-error (list "Wrong stderr" stderr))) - (let ((default-directory tramp-compat-temporary-file-directory) - (name (tramp-get-unique-process-name name)) + (let ((name (tramp-get-unique-process-name name)) (buffer (if buffer (get-buffer-create buffer) @@ -5058,7 +5057,8 @@ should be set connection-local.") ;; Check for `tramp-sh-file-name-handler' and ;; `adb-file-name-handler-p', because something is different ;; between tramp-sh.el, and tramp-adb.el or tramp-sshfs.el. - (let* ((sh-file-name-handler-p (tramp-sh-file-name-handler-p v)) + (let* ((default-directory tramp-compat-temporary-file-directory) + (sh-file-name-handler-p (tramp-sh-file-name-handler-p v)) (adb-file-name-handler-p (tramp-adb-file-name-p v)) (env (mapcar (lambda (elt)