emacs-diffs
[Top][All Lists]
Advanced

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

emacs-28 17e6f3b: ; Fix last change in tramp-sshfs.el


From: Michael Albinus
Subject: emacs-28 17e6f3b: ; Fix last change in tramp-sshfs.el
Date: Sun, 3 Oct 2021 11:01:37 -0400 (EDT)

branch: emacs-28
commit 17e6f3bee5a30f463082fad19d58de453ec9f490
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    ; 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 688e408..68230ee 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)



reply via email to

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