diff options
| author | Michael Albinus | 2016-01-28 13:37:58 +0100 |
|---|---|---|
| committer | Michael Albinus | 2016-01-28 13:37:58 +0100 |
| commit | deae005667516b7e1296527f7e34c54604a81882 (patch) | |
| tree | 62b156a0ae059d4b8566680a241b54c2005aafd9 | |
| parent | 8e5046a6e504c2eba349407251b3e2967ff1cfa9 (diff) | |
| download | emacs-deae005667516b7e1296527f7e34c54604a81882.tar.gz 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.el | 5 | ||||
| -rw-r--r-- | lisp/net/tramp-gvfs.el | 6 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 5 | ||||
| -rw-r--r-- | lisp/net/tramp-smb.el | 5 | ||||
| -rw-r--r-- | 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 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." | |||
| 1250 | ;; Read the expression. | 1250 | ;; Read the expression. |
| 1251 | (goto-char (point-min)) | 1251 | (goto-char (point-min)) |
| 1252 | (read (current-buffer))) | 1252 | (read (current-buffer))) |
| 1253 | ":" 'omit-nulls)))))))) | 1253 | ":" 'omit-nulls)) |
| 1254 | |||
| 1255 | ;; Mark it as connected. | ||
| 1256 | (tramp-set-connection-property p "connected" t))))))) | ||
| 1254 | 1257 | ||
| 1255 | (add-hook 'tramp-unload-hook | 1258 | (add-hook 'tramp-unload-hook |
| 1256 | (lambda () | 1259 | (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." | |||
| 1617 | ;; is marked with the fuse-mountpoint "/". We shall react. | 1617 | ;; is marked with the fuse-mountpoint "/". We shall react. |
| 1618 | (when (string-equal | 1618 | (when (string-equal |
| 1619 | (tramp-get-file-property vec "/" "fuse-mountpoint" "") "/") | 1619 | (tramp-get-file-property vec "/" "fuse-mountpoint" "") "/") |
| 1620 | (tramp-error vec 'file-error "FUSE mount denied"))))) | 1620 | (tramp-error vec 'file-error "FUSE mount denied")) |
| 1621 | |||
| 1622 | ;; Mark it as connected. | ||
| 1623 | (tramp-set-connection-property | ||
| 1624 | (tramp-get-connection-process vec) "connected" t)))) | ||
| 1621 | 1625 | ||
| 1622 | ;; In `tramp-check-cached-permissions', the connection properties | 1626 | ;; In `tramp-check-cached-permissions', the connection properties |
| 1623 | ;; {uig,gid}-{integer,string} are used. We set them to their local | 1627 | ;; {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." | |||
| 5040 | target-alist (cdr target-alist))) | 5040 | target-alist (cdr target-alist))) |
| 5041 | 5041 | ||
| 5042 | ;; Make initial shell settings. | 5042 | ;; Make initial shell settings. |
| 5043 | (tramp-open-connection-setup-interactive-shell p vec))))) | 5043 | (tramp-open-connection-setup-interactive-shell p vec) |
| 5044 | |||
| 5045 | ;; Mark it as connected. | ||
| 5046 | (tramp-set-connection-property p "connected" t))))) | ||
| 5044 | 5047 | ||
| 5045 | ;; When the user did interrupt, we must cleanup. | 5048 | ;; When the user did interrupt, we must cleanup. |
| 5046 | (quit | 5049 | (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 | |||
| 1914 | ;; character by character; if we send the string | 1914 | ;; character by character; if we send the string |
| 1915 | ;; at once, it is read painfully slow. | 1915 | ;; at once, it is read painfully slow. |
| 1916 | (tramp-set-connection-property p "smb-share" share) | 1916 | (tramp-set-connection-property p "smb-share" share) |
| 1917 | (tramp-set-connection-property p "chunksize" 1)) | 1917 | (tramp-set-connection-property p "chunksize" 1) |
| 1918 | |||
| 1919 | ;; Mark it as connected. | ||
| 1920 | (tramp-set-connection-property p "connected" t)) | ||
| 1918 | 1921 | ||
| 1919 | ;; Check for the error reason. If it was due to wrong | 1922 | ;; Check for the error reason. If it was due to wrong |
| 1920 | ;; password, reestablish the connection. We cannot | 1923 | ;; 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." | |||
| 3009 | (when (tramp-tramp-file-p filename) | 3009 | (when (tramp-tramp-file-p filename) |
| 3010 | (let* ((v (tramp-dissect-file-name filename)) | 3010 | (let* ((v (tramp-dissect-file-name filename)) |
| 3011 | (p (tramp-get-connection-process v)) | 3011 | (p (tramp-get-connection-process v)) |
| 3012 | (c (and p (processp p) (memq (process-status p) '(run open))))) | 3012 | (c (and p (processp p) (memq (process-status p) '(run open)) |
| 3013 | (tramp-get-connection-property p "connected" nil)))) | ||
| 3013 | ;; We expand the file name only, if there is already a connection. | 3014 | ;; We expand the file name only, if there is already a connection. |
| 3014 | (with-parsed-tramp-file-name | 3015 | (with-parsed-tramp-file-name |
| 3015 | (if c (expand-file-name filename) filename) nil | 3016 | (if c (expand-file-name filename) filename) nil |