From 17e6f3bee5a30f463082fad19d58de453ec9f490 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 3 Oct 2021 17:01:30 +0200 Subject: [PATCH] ; Fix last change in tramp-sshfs.el --- lisp/net/tramp-sshfs.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lisp/net/tramp-sshfs.el b/lisp/net/tramp-sshfs.el index 688e408bfb0..68230ee1ffe 100644 --- a/lisp/net/tramp-sshfs.el +++ b/lisp/net/tramp-sshfs.el @@ -222,12 +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* (signal-hook-function - (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) -- 2.39.5