aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMichael Albinus2015-08-30 09:59:02 +0200
committerMichael Albinus2015-08-30 09:59:02 +0200
commitcc90c25a50e536669ac327f7e05ec9194d1650d0 (patch)
treed190dc1e2f7730af9ba442bb21743061bc4c1777 /lisp
parent001c7dd928238a196dff4166ad29141116ef6d1c (diff)
downloademacs-cc90c25a50e536669ac327f7e05ec9194d1650d0.tar.gz
emacs-cc90c25a50e536669ac327f7e05ec9194d1650d0.zip
* lisp/net/tramp-sh.el (tramp-convert-file-attributes):
Revert patch from 2015-08-24. Tramp shall be have like for local files. * test/automated/tramp-tests.el (tramp-test18-file-attributes): Adapt test.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/net/tramp-sh.el18
1 files changed, 8 insertions, 10 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index c5ffb26b551..8cae8dc92b9 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -5114,18 +5114,10 @@ raises an error."
5114Convert file mode bits to string and set virtual device number. 5114Convert file mode bits to string and set virtual device number.
5115Return ATTR." 5115Return ATTR."
5116 (when attr 5116 (when attr
5117 ;; Convert symlink from `tramp-do-file-attributes-with-stat'. 5117 ;; Remove color escape sequences from symlink.
5118 (when (consp (car attr))
5119 (if (and (stringp (caar attr))
5120 (string-match ".+ -> .\\(.+\\)." (caar attr)))
5121 (setcar attr (match-string 1 (caar attr)))
5122 (setcar attr nil)))
5123 ;; Remove color escape sequences and double slashes from symlink.
5124 (when (stringp (car attr)) 5118 (when (stringp (car attr))
5125 (while (string-match tramp-color-escape-sequence-regexp (car attr)) 5119 (while (string-match tramp-color-escape-sequence-regexp (car attr))
5126 (setcar attr (replace-match "" nil nil (car attr)))) 5120 (setcar attr (replace-match "" nil nil (car attr)))))
5127 (while (string-match "//" (car attr))
5128 (setcar attr (replace-match "/" nil nil (car attr)))))
5129 ;; Convert uid and gid. Use -1 as indication of unusable value. 5121 ;; Convert uid and gid. Use -1 as indication of unusable value.
5130 (when (and (numberp (nth 2 attr)) (< (nth 2 attr) 0)) 5122 (when (and (numberp (nth 2 attr)) (< (nth 2 attr) 0))
5131 (setcar (nthcdr 2 attr) -1)) 5123 (setcar (nthcdr 2 attr) -1))
@@ -5166,6 +5158,12 @@ Return ATTR."
5166 ;; Convert directory indication bit. 5158 ;; Convert directory indication bit.
5167 (when (string-match "^d" (nth 8 attr)) 5159 (when (string-match "^d" (nth 8 attr))
5168 (setcar attr t)) 5160 (setcar attr t))
5161 ;; Convert symlink from `tramp-do-file-attributes-with-stat'.
5162 (when (consp (car attr))
5163 (if (and (stringp (caar attr))
5164 (string-match ".+ -> .\\(.+\\)." (caar attr)))
5165 (setcar attr (match-string 1 (caar attr)))
5166 (setcar attr nil)))
5169 ;; Set file's gid change bit. 5167 ;; Set file's gid change bit.
5170 (setcar (nthcdr 9 attr) 5168 (setcar (nthcdr 9 attr)
5171 (if (numberp (nth 3 attr)) 5169 (if (numberp (nth 3 attr))