emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 deae005: Fix Bug#22452


From: Michael Albinus
Subject: [Emacs-diffs] emacs-25 deae005: Fix Bug#22452
Date: Thu, 28 Jan 2016 12:38:06 +0000

branch: emacs-25
commit deae005667516b7e1296527f7e34c54604a81882
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    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)
---
 lisp/net/tramp-adb.el  |    5 ++++-
 lisp/net/tramp-gvfs.el |    6 +++++-
 lisp/net/tramp-sh.el   |    5 ++++-
 lisp/net/tramp-smb.el  |    5 ++++-
 lisp/net/tramp.el      |    3 ++-
 5 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index dbd1318..32fd188 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 e19ceae..dee8333 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 7ace886..1f43747 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 e957fdf..509e2e3 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 e8e40ae..4396216 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]