aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMichael Albinus2018-05-11 18:38:46 +0200
committerMichael Albinus2018-05-11 18:38:46 +0200
commite3d115ae86f7baa1483c5f14f1ac7d60d8aefa81 (patch)
treefdffad3a6d42ff91b07164d24436717c83e94b60 /lisp
parenteabb6f6c3ee75dac1a7510e80bdd3c2fcfbbbcb5 (diff)
downloademacs-e3d115ae86f7baa1483c5f14f1ac7d60d8aefa81.tar.gz
emacs-e3d115ae86f7baa1483c5f14f1ac7d60d8aefa81.zip
Tramp updates
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-attributes): Parse multibyte symlinks correctly. * test/lisp/net/tramp/tramp-tests.el (tramp--test-utf8): Improve backward compatibility.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/net/tramp-gvfs.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 199ac4fad24..a9a1a6085a4 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -1158,6 +1158,18 @@ If FILE-SYSTEM is non-nil, return file system attributes."
1158 (setq dirp (if (equal "directory" (cdr (assoc "type" attributes))) t)) 1158 (setq dirp (if (equal "directory" (cdr (assoc "type" attributes))) t))
1159 (setq res-symlink-target 1159 (setq res-symlink-target
1160 (cdr (assoc "standard::symlink-target" attributes))) 1160 (cdr (assoc "standard::symlink-target" attributes)))
1161 (when (stringp res-symlink-target)
1162 (setq res-symlink-target
1163 ;; Parse unibyte codes "\xNN". We assume they are
1164 ;; non-ASCII codepoints in the range #x80 through #xff.
1165 ;; Convert them to multibyte.
1166 (decode-coding-string
1167 (replace-regexp-in-string
1168 "\\\\x\\([[:xdigit:]]\\{2\\}\\)"
1169 (lambda (x)
1170 (unibyte-string (string-to-number (match-string 1 x) 16)))
1171 res-symlink-target)
1172 'utf-8)))
1161 ;; ... number links 1173 ;; ... number links
1162 (setq res-numlinks 1174 (setq res-numlinks
1163 (string-to-number 1175 (string-to-number