]> code.delx.au - gnu-emacs/commitdiff
Fix Bug#22452
authorMichael Albinus <michael.albinus@gmx.de>
Thu, 28 Jan 2016 12:37:58 +0000 (13:37 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Thu, 28 Jan 2016 12:37:58 +0000 (13:37 +0100)
* 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)

lisp/net/tramp-adb.el
lisp/net/tramp-gvfs.el
lisp/net/tramp-sh.el
lisp/net/tramp-smb.el
lisp/net/tramp.el

index dbd13183a92f04a2b8df3829889a8bda29b26362..32fd1888d3602b2ac474b85be6b25fcc24406603 100644 (file)
@@ -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 ()
index e19ceae89da59688b24091f75fa33b001e1b654c..dee8333e5477ccf83fb85593ca993020a7da4dcb 100644 (file)
@@ -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
index 7ace8864f88cfede090400ad9fd82628744169a8..1f43747c094a6d9b48477f62a95657c177873eb8 100644 (file)
@@ -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
index e957fdfd612d8bbe5ae7d5d0eea15ff741f1eb5c..509e2e388b8915f17ef112975e1f7ee328157fc0 100644 (file)
@@ -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
index e8e40ae23dc66d4d0aeb35ede1d98bb723bdf92c..43962169d5a6b8c56f7cc32f7c022292cd081e26 100644 (file)
@@ -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