aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2015-03-18 20:32:16 +0100
committerMichael Albinus2015-03-18 20:32:16 +0100
commit611a4791a4499eaaa5d1d652e538485b7c15ff0b (patch)
tree33bb066618c79a9f6ff96195e545cbc324f0a8e0
parent81deba3d7a2b187d58fe26bd8b4eafb5687095e1 (diff)
downloademacs-611a4791a4499eaaa5d1d652e538485b7c15ff0b.tar.gz
emacs-611a4791a4499eaaa5d1d652e538485b7c15ff0b.zip
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.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/net/tramp-sh.el10
2 files changed, 11 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2db0f9a349a..de940c304a9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12015-03-18 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp-sh.el (tramp-do-directory-files-and-attributes-with-stat):
4 Mark apostrophs with ?/ instead of \037. (Bug#20117)
5
12015-03-18 Stefan Monnier <monnier@iro.umontreal.ca> 62015-03-18 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 Add classes as run-time descriptors of cl-structs. 8 Add classes as run-time descriptors of cl-structs.
@@ -72,7 +77,7 @@
72 77
732015-03-17 Michael Albinus <michael.albinus@gmx.de> 782015-03-17 Michael Albinus <michael.albinus@gmx.de>
74 79
75 * tramp-sh.el (tramp-maybe-send-script): Avoid leading tabs in 80 * net/tramp-sh.el (tramp-maybe-send-script): Avoid leading tabs in
76 shell scripts. (Bug#20118) 81 shell scripts. (Bug#20118)
77 82
782015-03-17 Eli Zaretskii <eliz@gnu.org> 832015-03-17 Eli Zaretskii <eliz@gnu.org>
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."
1719 ;; "-"; this would confuse xargs. "ls -aQ" might be a solution, 1719 ;; "-"; this would confuse xargs. "ls -aQ" might be a solution,
1720 ;; but it does not work on all remote systems. Therefore, we 1720 ;; but it does not work on all remote systems. Therefore, we
1721 ;; use \000 as file separator. 1721 ;; use \000 as file separator.
1722 ;; Apostrophes in the stat output are masked as \037 characters, in 1722 ;; Apostrophes in the stat output are masked as ?/ characters, in
1723 ;; order to make a proper shell escape of them in file names. 1723 ;; order to make a proper shell escape of them in file names.
1724 "cd %s && echo \"(\"; (%s %s -a | " 1724 "cd %s && echo \"(\"; (%s %s -a | "
1725 "xargs %s -c " 1725 "xargs %s -c "
1726 "'(\037%%n\037 (\037%%N\037) %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 \037%%A\037 t %%ie0 -1)'" 1726 "'(/%%n/ (/%%N/) %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 /%%A/ t %%ie0 -1)' "
1727 " -- 2>/dev/null | sed -e 's/\"/\\\\\"/g' -e 's/\037/\"/g'); echo \")\"") 1727 "-- 2>/dev/null | sed -e 's/\"/\\\\\"/g' -e 's/\\//\"/g'); echo \")\"")
1728 (tramp-shell-quote-argument localname) 1728 (tramp-shell-quote-argument localname)
1729 (tramp-get-ls-command vec) 1729 (tramp-get-ls-command vec)
1730 ;; On systems which have no quoting style, file names with 1730 ;; On systems which have no quoting style, file names with
@@ -1732,8 +1732,8 @@ be non-negative integers."
1732 (if (tramp-get-ls-command-with-quoting-style vec) 1732 (if (tramp-get-ls-command-with-quoting-style vec)
1733 "--quoting-style=shell" "") 1733 "--quoting-style=shell" "")
1734 (tramp-get-remote-stat vec) 1734 (tramp-get-remote-stat vec)
1735 (if (eq id-format 'integer) "%ue0" "\037%U\037") 1735 (if (eq id-format 'integer) "%ue0" "/%U/")
1736 (if (eq id-format 'integer) "%ge0" "\037%G\037")))) 1736 (if (eq id-format 'integer) "%ge0" "/%G/"))))
1737 1737
1738;; This function should return "foo/" for directories and "bar" for 1738;; This function should return "foo/" for directories and "bar" for
1739;; files. 1739;; files.