;; 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 ()
;; 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
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
;; 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
(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