]> git.eshelyaron.com Git - emacs.git/commitdiff
Make a more robust check in Tramp using scripts
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 7 Dec 2021 15:20:13 +0000 (16:20 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Tue, 7 Dec 2021 15:20:13 +0000 (16:20 +0100)
* lisp/net/tramp-sh.el (tramp-find-inline-encoding):
Check, whether scripts in `tramp-remote-coding-commands' are
expandable.

lisp/net/tramp-sh.el

index c2a023124744757b233f489d6d4ae57c4f3aa395..72eb63d3929d628640948abd65acf2a817d5cce2 100644 (file)
@@ -4597,6 +4597,8 @@ Goes through the list `tramp-local-coding-commands' and
                          (value (symbol-value rem-enc)))
                      (while (string-match "-" name)
                        (setq name (replace-match "_" nil t name)))
+                     (unless (tramp-expand-script vec value)
+                       (throw 'wont-work-remote nil))
                      (tramp-maybe-send-script vec value name)
                      (setq rem-enc name)))
                  (tramp-message
@@ -4614,6 +4616,8 @@ Goes through the list `tramp-local-coding-commands' and
                          (value (symbol-value rem-dec)))
                      (while (string-match "-" name)
                        (setq name (replace-match "_" nil t name)))
+                     (unless (tramp-expand-script vec value)
+                       (throw 'wont-work-remote nil))
                      (tramp-maybe-send-script vec value name)
                      (setq rem-dec name)))
                  (tramp-message