summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2016-01-28 13:37:58 +0100
committerMichael Albinus <michael.albinus@gmx.de>2016-01-28 13:37:58 +0100
commitdeae005667516b7e1296527f7e34c54604a81882 (patch)
tree62b156a0ae059d4b8566680a241b54c2005aafd9
parent8e5046a6e504c2eba349407251b3e2967ff1cfa9 (diff)
downloademacs-deae005667516b7e1296527f7e34c54604a81882.tar.gz
emacs-deae005667516b7e1296527f7e34c54604a81882.tar.bz2
emacs-deae005667516b7e1296527f7e34c54604a81882.zip
Fix Bug#22452
* lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): Mark it as connected. * lisp/net/tramp.el (tramp-handle-file-remote-p): Check also, if connection property "connected" is set. (Bug#22452)
-rw-r--r--lisp/net/tramp-adb.el5
-rw-r--r--lisp/net/tramp-gvfs.el6
-rw-r--r--lisp/net/tramp-sh.el5
-rw-r--r--lisp/net/tramp-smb.el5
-rw-r--r--lisp/net/tramp.el3
5 files changed, 19 insertions, 5 deletions
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index dbd13183a92..32fd1888d36 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -1250,7 +1250,10 @@ connection if a previous connection has died for some reason."
;; Read the expression.
(goto-char (point-min))
(read (current-buffer)))
- ":" 'omit-nulls))))))))
+ ":" 'omit-nulls))
+
+ ;; Mark it as connected.
+ (tramp-set-connection-property p "connected" t)))))))
(add-hook 'tramp-unload-hook
(lambda ()
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index e19ceae89da..dee8333e547 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -1617,7 +1617,11 @@ connection if a previous connection has died for some reason."
;; is marked with the fuse-mountpoint "/". We shall react.
(when (string-equal
(tramp-get-file-property vec "/" "fuse-mountpoint" "") "/")
- (tramp-error vec 'file-error "FUSE mount denied")))))
+ (tramp-error vec 'file-error "FUSE mount denied"))
+
+ ;; Mark it as connected.
+ (tramp-set-connection-property
+ (tramp-get-connection-process vec) "connected" t))))
;; In `tramp-check-cached-permissions', the connection properties
;; {uig,gid}-{integer,string} are used. We set them to their local
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 7ace8864f88..1f43747c094 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -5040,7 +5040,10 @@ connection if a previous connection has died for some reason."
target-alist (cdr target-alist)))
;; Make initial shell settings.
- (tramp-open-connection-setup-interactive-shell p vec)))))
+ (tramp-open-connection-setup-interactive-shell p vec)
+
+ ;; Mark it as connected.
+ (tramp-set-connection-property p "connected" t)))))
;; When the user did interrupt, we must cleanup.
(quit
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index e957fdfd612..509e2e388b8 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -1914,7 +1914,10 @@ If ARGUMENT is non-nil, use it as argument for
;; character by character; if we send the string
;; at once, it is read painfully slow.
(tramp-set-connection-property p "smb-share" share)
- (tramp-set-connection-property p "chunksize" 1))
+ (tramp-set-connection-property p "chunksize" 1)
+
+ ;; Mark it as connected.
+ (tramp-set-connection-property p "connected" t))
;; Check for the error reason. If it was due to wrong
;; password, reestablish the connection. We cannot
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index e8e40ae23dc..43962169d5a 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3009,7 +3009,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