emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 3a6df2d: Support stat 8.26 in Tramp


From: Michael Albinus
Subject: [Emacs-diffs] master 3a6df2d: Support stat 8.26 in Tramp
Date: Wed, 11 Jan 2017 16:14:03 +0000 (UTC)

branch: master
commit 3a6df2d6043d32dd9a1864c87de8d99e9739a7e4
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    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)
---
 lisp/net/tramp-sh.el |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 71a3887..a3641c6 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -5357,12 +5357,14 @@ Nonexistent directories are removed from spec."
       ;; work on older AIX systems.  Recent GNU stat versions (8.24?)
       ;; use shell quoted format for "%N", we check the boundaries "`"
       ;; and "'", therefore.  See Bug#23422 in coreutils.
+      ;; Since GNU stat 8.26, environment variable QUOTING_STYLE is
+      ;; supported.
       (when result
-       (setq tmp
-             (tramp-send-command-and-read
-              vec (format "%s -c '(\"%%N\" %%s)' /" result) 'noerror))
+       (setq result (concat "env QUOTING_STYLE=locale " result)
+             tmp (tramp-send-command-and-read
+                  vec (format "%s -c '(\"%%N\" %%s)' /" result) 'noerror))
        (unless (and (listp tmp) (stringp (car tmp))
-                    (string-match "^`/'$" (car tmp))
+                    (string-match "^\\(`/'\\|‘/’\\)$" (car tmp))
                     (integerp (cadr tmp)))
          (setq result nil)))
       result)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]