From: Michael Albinus Date: Wed, 18 Mar 2015 19:32:16 +0000 (+0100) Subject: Mark apostrophs with ?/ instead of \037 in Tramp X-Git-Tag: emacs-25.0.90~2564^2~131 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=611a4791a4499eaaa5d1d652e538485b7c15ff0b;p=emacs.git 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2db0f9a349a..de940c304a9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2015-03-18 Michael Albinus + + * 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 Add classes as run-time descriptors of cl-structs. @@ -72,7 +77,7 @@ 2015-03-17 Michael Albinus - * 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 diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 133d886f372..b82b4deb21a 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -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.