aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2017-01-11 17:13:41 +0100
committerMichael Albinus2017-01-11 17:13:41 +0100
commit3a6df2d6043d32dd9a1864c87de8d99e9739a7e4 (patch)
treeb24c77e4fc5fb5c81994994bba4ff00860e59f23
parentfa0a2b4e7c81f57aecc1d94df00588a4dd5c281d (diff)
downloademacs-3a6df2d6043d32dd9a1864c87de8d99e9739a7e4.tar.gz
emacs-3a6df2d6043d32dd9a1864c87de8d99e9739a7e4.zip
Support stat 8.26 in Tramp
* lisp/net/tramp-sh.el (tramp-get-remote-stat): Use QUOTING_STYLE environment variable of newer coreutils. (Bug#23422)
-rw-r--r--lisp/net/tramp-sh.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 71a388767d0..a3641c6c401 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -5357,12 +5357,14 @@ Nonexistent directories are removed from spec."
5357 ;; work on older AIX systems. Recent GNU stat versions (8.24?) 5357 ;; work on older AIX systems. Recent GNU stat versions (8.24?)
5358 ;; use shell quoted format for "%N", we check the boundaries "`" 5358 ;; use shell quoted format for "%N", we check the boundaries "`"
5359 ;; and "'", therefore. See Bug#23422 in coreutils. 5359 ;; and "'", therefore. See Bug#23422 in coreutils.
5360 ;; Since GNU stat 8.26, environment variable QUOTING_STYLE is
5361 ;; supported.
5360 (when result 5362 (when result
5361 (setq tmp 5363 (setq result (concat "env QUOTING_STYLE=locale " result)
5362 (tramp-send-command-and-read 5364 tmp (tramp-send-command-and-read
5363 vec (format "%s -c '(\"%%N\" %%s)' /" result) 'noerror)) 5365 vec (format "%s -c '(\"%%N\" %%s)' /" result) 'noerror))
5364 (unless (and (listp tmp) (stringp (car tmp)) 5366 (unless (and (listp tmp) (stringp (car tmp))
5365 (string-match "^`/'$" (car tmp)) 5367 (string-match "^\\(`/'\\|‘/’\\)$" (car tmp))
5366 (integerp (cadr tmp))) 5368 (integerp (cadr tmp)))
5367 (setq result nil))) 5369 (setq result nil)))
5368 result))) 5370 result)))