diff lisp/net/tramp-vc.el @ 53206:0c19f1a19b2b

(tramp-chunksize): Extend docstring. Suggested by Charles Curley <charlescurley@charlescurley.com>. (tramp-multi-connection-function-alist): Add ssht entry which adds "-e none -t -t" to the list of ssh args. Suggested by Adrian Aichner. (tramp-get-method-parameter): New function to retrieve a method parameter. This allows for omission of method parameters. Callers adjusted.
author Kai Großjohann <kgrossjo@eu.uu.net>
date Sun, 30 Nov 2003 18:15:22 +0000
parents 695cf19ef79e
children c44f9de543e3
line wrap: on
line diff
--- a/lisp/net/tramp-vc.el	Sun Nov 30 17:51:56 2003 +0000
+++ b/lisp/net/tramp-vc.el	Sun Nov 30 18:15:22 2003 +0000
@@ -391,8 +391,15 @@
   ;; Pacify byte-compiler; this symbol is bound in the calling
   ;; function.  CCC: Maybe it would be better to move the
   ;; boundness-checking into this function?
-  (let ((file (symbol-value 'file)))
-    (if (and uid (/= uid (nth 2 (file-attributes file))))
+  (let ((file (symbol-value 'file))
+	(remote-uid
+	 ;; With Emacs 21.4, `file-attributes' has got an optional parameter
+	 ;; ID-FORMAT. Handle this case backwards compatible.
+	 (if (and (functionp 'subr-arity)
+		  (= 2 (cdr (subr-arity (symbol-function 'file-attributes)))))
+	     (nth 2 (file-attributes file 'integer))
+	   (nth 2 (file-attributes file)))))
+    (if (and uid (/= uid remote-uid))
 	(error "tramp-handle-vc-user-login-name cannot map a uid to a name")
       (let* ((v (tramp-dissect-file-name (tramp-handle-expand-file-name file)))
 	     (u (tramp-file-name-user v)))