]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix quoting in tramp-find-inline-compress for w32
authorMichael Albinus <michael.albinus@gmx.de>
Fri, 2 Feb 2018 13:33:33 +0000 (14:33 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Fri, 2 Feb 2018 13:33:33 +0000 (14:33 +0100)
* lisp/net/tramp-sh.el (tramp-find-inline-compress): Improve command
quoting for w32.  Reported by Chris Zheng <chriszheng99@gmail.com>.

lisp/net/tramp-sh.el

index 5ee8f93870cf8c29c17cdd91712e93110a575279..5204ec725a3f58c3c6c903b84f9624b8dc881b01 100644 (file)
@@ -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