diff options
author | Michael Albinus <[email protected]> | 2011-01-10 21:36:09 +0100 |
---|---|---|
committer | Michael Albinus <[email protected]> | 2011-01-10 21:36:09 +0100 |
commit | 01d70c32ce23b9a28f27467444d087afce51607f (patch) | |
tree | f4e555ae44f033094706a05492aafd66e107602a /lisp/net | |
parent | 6a0ecd86d28fd5e5be53e7bf699f8dae242aab81 (diff) |
* net/tramp.el (tramp-find-inline-compress)
(tramp-get-inline-coding): Quote command after pipe symbol for
local calls under W32. (Bug#6784)
Diffstat (limited to 'lisp/net')
-rw-r--r-- | lisp/net/tramp.el | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 4fb8d7b786..c40d65ca91 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -7362,9 +7362,17 @@ Goes through the list `tramp-inline-compress-commands'." vec 5 "Checking local compress command `%s', `%s' for sanity" compress decompress) - (unless (zerop (tramp-call-local-coding-command - (format "echo %s | %s | %s" - magic compress decompress) nil nil)) + (unless + (zerop + (tramp-call-local-coding-command + (format + ;; 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) nil nil)) (throw 'next nil)) (tramp-message vec 5 @@ -8645,9 +8653,25 @@ function cell is returned to be applied on a buffer." ((symbolp coding) coding) ((and compress (string-match "decoding" prop)) - (format "(%s | %s >%%s)" coding compress)) + (format + ;; Windows shells need the program file name after + ;; the pipe symbol be quoted if they use forward + ;; slashes as directory separators. + (if (and (string-match "local" prop) + (memq system-type '(windows-nt))) + "(%s | \"%s\" >%%s)" + "(%s | %s >%%s)") + coding compress)) (compress - (format "(%s <%%s | %s)" compress coding)) + (format + ;; Windows shells need the program file name after + ;; the pipe symbol be quoted if they use forward + ;; slashes as directory separators. + (if (and (string-match "local" prop) + (memq system-type '(windows-nt))) + "(%s <%%s | \"%s\")" + "(%s <%%s | %s)") + compress coding)) ((string-match "decoding" prop) (format "%s >%%s" coding)) (t |