]> code.delx.au - gnu-emacs/commitdiff
Mark apostrophs with ?/ instead of \037 in Tramp
authorMichael Albinus <michael.albinus@gmx.de>
Wed, 18 Mar 2015 19:32:16 +0000 (20:32 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Wed, 18 Mar 2015 19:32:16 +0000 (20:32 +0100)
Fixes: debbugs:20117
* net/tramp-sh.el (tramp-do-directory-files-and-attributes-with-stat):
Mark apostrophs with ?/ instead of \037.

lisp/ChangeLog
lisp/net/tramp-sh.el

index 2db0f9a349ab83ff9c04212ac9a83acd83198cba..de940c304a9c1825433bd3ebf6c51a21e0822cd7 100644 (file)
@@ -1,3 +1,8 @@
+2015-03-18  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-sh.el (tramp-do-directory-files-and-attributes-with-stat):
+       Mark apostrophs with ?/ instead of \037.  (Bug#20117)
+
 2015-03-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        Add classes as run-time descriptors of cl-structs.
@@ -72,7 +77,7 @@
 
 2015-03-17  Michael Albinus  <michael.albinus@gmx.de>
 
-       * tramp-sh.el (tramp-maybe-send-script): Avoid leading tabs in
+       * net/tramp-sh.el (tramp-maybe-send-script): Avoid leading tabs in
        shell scripts.  (Bug#20118)
 
 2015-03-17  Eli Zaretskii  <eliz@gnu.org>
index 133d886f3725cb9496b56323b1843b0b8aadb1e8..b82b4deb21a1df298a8da5017a1a2d9bf29af1dc 100644 (file)
@@ -1719,12 +1719,12 @@ be non-negative integers."
      ;; "-"; this would confuse xargs.  "ls -aQ" might be a solution,
      ;; but it does not work on all remote systems.  Therefore, we
      ;; use \000 as file separator.
-     ;; Apostrophes in the stat output are masked as \037 characters, in
+     ;; Apostrophes in the stat output are masked as ?/ characters, in
      ;; order to make a proper shell escape of them in file names.
      "cd %s && echo \"(\"; (%s %s -a | "
      "xargs %s -c "
-     "'(\037%%n\037 (\037%%N\037) %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 \037%%A\037 t %%ie0 -1)'"
-     " -- 2>/dev/null | sed -e 's/\"/\\\\\"/g' -e 's/\037/\"/g'); echo \")\"")
+     "'(/%%n/ (/%%N/) %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 /%%A/ t %%ie0 -1)' "
+     "-- 2>/dev/null | sed -e 's/\"/\\\\\"/g' -e 's/\\//\"/g'); echo \")\"")
     (tramp-shell-quote-argument localname)
     (tramp-get-ls-command vec)
     ;; On systems which have no quoting style, file names with
@@ -1732,8 +1732,8 @@ be non-negative integers."
     (if (tramp-get-ls-command-with-quoting-style vec)
        "--quoting-style=shell" "")
     (tramp-get-remote-stat vec)
-    (if (eq id-format 'integer) "%ue0" "\037%U\037")
-    (if (eq id-format 'integer) "%ge0" "\037%G\037"))))
+    (if (eq id-format 'integer) "%ue0" "/%U/")
+    (if (eq id-format 'integer) "%ge0" "/%G/"))))
 
 ;; This function should return "foo/" for directories and "bar" for
 ;; files.