mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-19 12:20:17 -08:00
tramp-sh.el: Work around a stat bug (backport from master)
* lisp/net/tramp-sh.el (tramp-get-remote-stat): Do not use
stat versions which produce shell quoted output. See also
coreutils Bug#23422.
(cherry picked from commit 6aad36ace9)
This commit is contained in:
parent
50650cb688
commit
c760a600da
1 changed files with 4 additions and 2 deletions
|
|
@ -5522,13 +5522,15 @@ Return ATTR."
|
||||||
vec "stat" (tramp-get-remote-path vec)))
|
vec "stat" (tramp-get-remote-path vec)))
|
||||||
tmp)
|
tmp)
|
||||||
;; Check whether stat(1) returns usable syntax. "%s" does not
|
;; Check whether stat(1) returns usable syntax. "%s" does not
|
||||||
;; work on older AIX systems.
|
;; 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.
|
||||||
(when result
|
(when result
|
||||||
(setq tmp
|
(setq tmp
|
||||||
(tramp-send-command-and-read
|
(tramp-send-command-and-read
|
||||||
vec (format "%s -c '(\"%%N\" %%s)' /" result) 'noerror))
|
vec (format "%s -c '(\"%%N\" %%s)' /" result) 'noerror))
|
||||||
(unless (and (listp tmp) (stringp (car tmp))
|
(unless (and (listp tmp) (stringp (car tmp))
|
||||||
(string-match "^./.$" (car tmp))
|
(string-match "^`/'$" (car tmp))
|
||||||
(integerp (cadr tmp)))
|
(integerp (cadr tmp)))
|
||||||
(setq result nil)))
|
(setq result nil)))
|
||||||
result)))
|
result)))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue