summaryrefslogtreecommitdiff
path: root/lisp/net/tramp.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/net/tramp.el')
-rw-r--r--lisp/net/tramp.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 4543c0d1a47..6d8ea021ef3 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2869,7 +2869,8 @@ User is always nil."
(when (tramp-tramp-file-p filename)
(let* ((v (tramp-dissect-file-name filename))
(p (tramp-get-connection-process v))
- (c (and p (processp p) (memq (process-status p) '(run open)))))
+ (c (and p (processp p) (memq (process-status p) '(run open))
+ (tramp-get-connection-property p "connected" nil))))
;; We expand the file name only, if there is already a connection.
(with-parsed-tramp-file-name
(if c (expand-file-name filename) filename) nil