aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2018-02-02 14:33:33 +0100
committerMichael Albinus2018-02-02 14:33:33 +0100
commitecc6257f48eb3a87d93ebe91f18b1d871faece5d (patch)
treebbf0420236d17f9542730c7c0c5ca4738fa827ee
parente08de2bae2a8e91c0245259dfcbfdca1d191a119 (diff)
downloademacs-ecc6257f48eb3a87d93ebe91f18b1d871faece5d.tar.gz
emacs-ecc6257f48eb3a87d93ebe91f18b1d871faece5d.zip
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 <chriszheng99@gmail.com>.
-rw-r--r--lisp/net/tramp-sh.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 5ee8f93870c..5204ec725a3 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'."
4464 (zerop 4464 (zerop
4465 (tramp-call-local-coding-command 4465 (tramp-call-local-coding-command
4466 (format 4466 (format
4467 "echo %s | %s | %s" magic
4467 ;; Windows shells need the program file name after 4468 ;; Windows shells need the program file name after
4468 ;; the pipe symbol be quoted if they use forward 4469 ;; the pipe symbol be quoted if they use forward
4469 ;; slashes as directory separators. 4470 ;; slashes as directory separators.
4470 (if (memq system-type '(windows-nt)) 4471 (mapconcat
4471 "echo %s | \"%s\" | \"%s\"" 4472 'shell-quote-argument (split-string compress) " ")
4472 "echo %s | %s | %s") 4473 (mapconcat
4473 magic compress decompress) 4474 'shell-quote-argument (split-string decompress) " "))
4474 nil nil)) 4475 nil nil))
4475 (throw 'next nil)) 4476 (throw 'next nil))
4476 (tramp-message 4477 (tramp-message