emacs-diffs
[Top][All Lists]
Advanced

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

master d9462e24a96: Make Tramp more robust


From: Michael Albinus
Subject: master d9462e24a96: Make Tramp more robust
Date: Mon, 8 Jan 2024 08:52:40 -0500 (EST)

branch: master
commit d9462e24a967e32d550ee886b5150f0cc78358f6
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    Make Tramp more robust
    
    * lisp/net/tramp-sh.el (tramp-bundle-read-file-names): Check, that
    the command finishes successfully.
---
 lisp/net/tramp-sh.el | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 6489f473634..8ec9467ab45 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -3652,20 +3652,20 @@ filled are described in `tramp-bundle-read-file-names'."
 
     (dolist
        (elt
-        (ignore-errors
+        (with-current-buffer (tramp-get-connection-buffer vec)
           ;; We cannot use `tramp-send-command-and-read', because
           ;; this does not cooperate well with heredoc documents.
-          (tramp-send-command
-           vec
-           (format
-            "tramp_bundle_read_file_names <<'%s'\n%s\n%s\n"
-            tramp-end-of-heredoc
-            (mapconcat #'tramp-shell-quote-argument files "\n")
-            tramp-end-of-heredoc))
-          (with-current-buffer (tramp-get-connection-buffer vec)
-            ;; Read the expression.
-            (goto-char (point-min))
-            (read (current-buffer)))))
+          (unless (tramp-send-command-and-check
+                   vec
+                   (format
+                    "tramp_bundle_read_file_names <<'%s'\n%s\n%s\n"
+                    tramp-end-of-heredoc
+                    (mapconcat #'tramp-shell-quote-argument files "\n")
+                    tramp-end-of-heredoc))
+            (tramp-error vec 'file-error "%s" (tramp-get-buffer-string)))
+          ;; Read the expression.
+          (goto-char (point-min))
+          (read (current-buffer))))
 
       (tramp-set-file-property vec (car elt) "file-exists-p" (nth 1 elt))
       (tramp-set-file-property vec (car elt) "file-readable-p" (nth 2 elt))



reply via email to

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