changeset 94333:1a9897682308

* net/tramp.el (tramp-get-remote-stat): Test whether stat supports %s. Reported by Loris Bennett <loris.bennett@fu-berlin.de>.
author Michael Albinus <michael.albinus@gmx.de>
date Thu, 24 Apr 2008 19:32:27 +0000
parents 4d11d8c52b60
children ca0f99d3a8eb
files lisp/net/tramp.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/net/tramp.el	Thu Apr 24 18:36:47 2008 +0000
+++ b/lisp/net/tramp.el	Thu Apr 24 19:32:27 2008 +0000
@@ -6965,17 +6965,19 @@
       (let ((result (tramp-find-executable
 		     vec "stat" (tramp-get-remote-path vec)))
 	    tmp)
-	;; Check whether stat(1) returns usable syntax.
+	;; Check whether stat(1) returns usable syntax.  %s does not
+	;; work on older AIX systems.
 	(when result
 	  (setq tmp
 		;; We don't want to display an error message.
 		(with-temp-message (or (current-message) "")
 		  (condition-case nil
 		      (tramp-send-command-and-read
-		       vec (format "%s -c '(\"%%N\")' /" result))
+		       vec (format "%s -c '(\"%%N\" %%s)' /" result))
 		    (error nil))))
 	  (unless (and (listp tmp) (stringp (car tmp))
-		       (string-match "^./.$" (car tmp)))
+		       (string-match "^./.$" (car tmp))
+		       (integerp (cadr tmp)))
 	    (setq result nil)))
 	result))))