emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master ecc6257: Fix quoting in tramp-find-inline-compress


From: Michael Albinus
Subject: [Emacs-diffs] master ecc6257: Fix quoting in tramp-find-inline-compress for w32
Date: Fri, 2 Feb 2018 08:33:44 -0500 (EST)

branch: master
commit ecc6257f48eb3a87d93ebe91f18b1d871faece5d
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Fix quoting in tramp-find-inline-compress for w32
    
    * lisp/net/tramp-sh.el (tramp-find-inline-compress): Improve command
    quoting for w32.  Reported by Chris Zheng <address@hidden>.
---
 lisp/net/tramp-sh.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 5ee8f93..5204ec7 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4464,13 +4464,14 @@ Goes through the list `tramp-inline-compress-commands'."
              (zerop
               (tramp-call-local-coding-command
                (format
+                "echo %s | %s | %s" magic
                 ;; Windows shells need the program file name after
                 ;; the pipe symbol be quoted if they use forward
                 ;; slashes as directory separators.
-                (if (memq system-type '(windows-nt))
-                    "echo %s | \"%s\" | \"%s\""
-                  "echo %s | %s | %s")
-                magic compress decompress)
+                (mapconcat
+                 'shell-quote-argument (split-string compress) " ")
+                (mapconcat
+                 'shell-quote-argument (split-string decompress) " "))
                nil nil))
            (throw 'next nil))
          (tramp-message



reply via email to

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