emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100369: * net/tramp.el (tramp-fin


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100369: * net/tramp.el (tramp-find-inline-compress)
Date: Mon, 10 Jan 2011 21:36:09 +0100
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100369
committer: Michael Albinus <address@hidden>
branch nick: emacs-23
timestamp: Mon 2011-01-10 21:36:09 +0100
message:
  * net/tramp.el (tramp-find-inline-compress)
  (tramp-get-inline-coding): Quote command after pipe symbol for
  local calls under W32.  (Bug#6784)
modified:
  lisp/ChangeLog
  lisp/net/tramp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-01-10 19:42:46 +0000
+++ b/lisp/ChangeLog    2011-01-10 20:36:09 +0000
@@ -1,5 +1,11 @@
 2011-01-10  Michael Albinus  <address@hidden>
 
+       * net/tramp.el (tramp-find-inline-compress)
+       (tramp-get-inline-coding): Quote command after pipe symbol for
+       local calls under W32.  (Bug#6784)
+
+2011-01-10  Michael Albinus  <address@hidden>
+
        * net/tramp.el (tramp-default-method): Initialize with pscp/plink
        only when running under W32.
 

=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2011-01-10 19:42:46 +0000
+++ b/lisp/net/tramp.el 2011-01-10 20:36:09 +0000
@@ -7362,9 +7362,17 @@
           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 @@
         ((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


reply via email to

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