Merge from emacs-24; up to 2012-12-05T00:13:56Z!yamaoka@jpl.org
[bpt/emacs.git] / lisp / net / tramp-sh.el
index a76bac7..e46b32c 100644 (file)
@@ -1458,7 +1458,9 @@ and gid of the corresponding user is taken.  Both parameters must be integers."
   ;; working with su(do)? when it is needed, so it shall succeed in
   ;; the majority of cases.
   ;; Don't modify `last-coding-system-used' by accident.
-  (let ((last-coding-system-used last-coding-system-used))
+  (let ((last-coding-system-used last-coding-system-used)
+       (uid (and (numberp uid) (round uid)))
+       (gid (and (numberp gid) (round gid))))
     (if (file-remote-p filename)
        (with-parsed-tramp-file-name filename nil
          (if (and (zerop (user-uid)) (tramp-local-host-p v))