From 73406194024fcb6877db0618300b63916ebf466d Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 2 Sep 2012 11:57:19 +0200 Subject: * eshell/em-unix.el (eshell/sudo): When we have an ad-hoc remote definition of `default-directory', ensure we can connect. --- lisp/eshell/em-unix.el | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lisp/eshell/em-unix.el') diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index 35f7a0a9e3d..58402e37508 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -1110,6 +1110,8 @@ Execute a COMMAND as the superuser or another USER.") (format "%s|sudo:%s@%s:%s" (substring prefix 0 -1) user host dir) (format "/sudo:%s@%s:%s" user host dir)))) + ;; Ensure, that Tramp has connected to that construct already. + (file-exists-p default-directory) (eshell-named-command (car orig-args) (cdr orig-args)))))))) (put 'eshell/sudo 'eshell-no-numeric-conversions t) -- cgit v1.2.1