*** /usr/local/src/emacs/lisp/net/tramp-sh.el.~6e790b71efae6003b9fa701a8630ee69e0a94294~ 2016-05-05 10:40:11.455293200 +0200 --- /usr/local/src/emacs/lisp/net/tramp-sh.el 2016-05-05 10:19:50.567195614 +0200 *************** *** 5430,5442 **** vec "stat" (tramp-get-remote-path vec))) tmp) ;; Check whether stat(1) returns usable syntax. "%s" does not ! ;; work on older AIX systems. (when result (setq 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)) (integerp (cadr tmp))) (setq result nil))) result))) --- 5430,5444 ---- vec "stat" (tramp-get-remote-path vec))) tmp) ;; Check whether stat(1) returns usable syntax. "%s" does not ! ;; 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 (setq 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)) (integerp (cadr tmp))) (setq result nil))) result)))