Mark apostrophs with ?/ instead of \037 in Tramp

Fixes: debbugs:20117

* net/tramp-sh.el (tramp-do-directory-files-and-attributes-with-stat):
Mark apostrophs with ?/ instead of \037.
This commit is contained in:
Michael Albinus 2015-03-18 20:32:16 +01:00
parent 81deba3d7a
commit 611a4791a4
2 changed files with 11 additions and 6 deletions

View 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>

View 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.