391 |
;; Pacify byte-compiler; this symbol is bound in the calling |
;; Pacify byte-compiler; this symbol is bound in the calling |
392 |
;; function. CCC: Maybe it would be better to move the |
;; function. CCC: Maybe it would be better to move the |
393 |
;; boundness-checking into this function? |
;; boundness-checking into this function? |
394 |
(let ((file (symbol-value 'file))) |
(let ((file (symbol-value 'file)) |
395 |
(if (and uid (/= uid (nth 2 (file-attributes file)))) |
(remote-uid |
396 |
|
;; With Emacs 21.4, `file-attributes' has got an optional parameter |
397 |
|
;; ID-FORMAT. Handle this case backwards compatible. |
398 |
|
(if (and (functionp 'subr-arity) |
399 |
|
(= 2 (cdr (subr-arity (symbol-function 'file-attributes))))) |
400 |
|
(nth 2 (file-attributes file 'integer)) |
401 |
|
(nth 2 (file-attributes file))))) |
402 |
|
(if (and uid (/= uid remote-uid)) |
403 |
(error "tramp-handle-vc-user-login-name cannot map a uid to a name") |
(error "tramp-handle-vc-user-login-name cannot map a uid to a name") |
404 |
(let* ((v (tramp-dissect-file-name (tramp-handle-expand-file-name file))) |
(let* ((v (tramp-dissect-file-name (tramp-handle-expand-file-name file))) |
405 |
(u (tramp-file-name-user v))) |
(u (tramp-file-name-user v))) |