summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-sshfs.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/net/tramp-sshfs.el')
-rw-r--r--lisp/net/tramp-sshfs.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/net/tramp-sshfs.el b/lisp/net/tramp-sshfs.el
index 0019ac014f8..2be0485fbf1 100644
--- a/lisp/net/tramp-sshfs.el
+++ b/lisp/net/tramp-sshfs.el
@@ -222,11 +222,14 @@ arguments to pass to the OPERATION."
(defun tramp-sshfs-handle-insert-file-contents
(filename &optional visit beg end replace)
"Like `insert-file-contents' for Tramp files."
- (let ((result
- (insert-file-contents
- (tramp-fuse-local-file-name filename) visit beg end replace)))
- (when visit (setq buffer-file-name filename))
- (cons (expand-file-name filename) (cdr result))))
+ (setq filename (expand-file-name filename))
+ (let (signal-hook-function result)
+ (unwind-protect
+ (setq result
+ (insert-file-contents
+ (tramp-fuse-local-file-name filename) visit beg end replace))
+ (when visit (setq buffer-file-name filename))
+ (cons filename (cdr result)))))
(defun tramp-sshfs-handle-process-file
(program &optional infile destination display &rest args)
@@ -368,6 +371,7 @@ connection if a previous connection has died for some reason."
vec 'file-error "Error mounting %s" (tramp-fuse-mount-spec vec))))
;; Mark it as connected.
+ (add-to-list 'tramp-fuse-mount-points (tramp-file-name-unify vec))
(tramp-set-connection-property
(tramp-get-connection-process vec) "connected" t)))