aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMichael Albinus2016-07-09 14:20:07 +0200
committerMichael Albinus2016-07-09 14:20:07 +0200
commitbfc29a5bcef1df4380a4f043f05035b88cd5c482 (patch)
treedb867a7b99fee490b5bce54ff7444239de5a2aca /lisp
parente4adb6cdf30706f28dada8aafd347549c84105ac (diff)
downloademacs-bfc29a5bcef1df4380a4f043f05035b88cd5c482.tar.gz
emacs-bfc29a5bcef1df4380a4f043f05035b88cd5c482.zip
Avoid recursive detection of remote uid and gid in tramp-gvfs.el
* lisp/net/tramp-gvfs.el (tramp-gvfs-get-remote-uid-gid-in-progress): New variable. (tramp-gvfs-maybe-open-connection): Use it. * test/lisp/net/tramp-tests.el (tramp-test18-file-attributes): Reorder test.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/net/tramp-gvfs.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 038bb533c3e..2b207f624e0 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -1607,6 +1607,9 @@ ID-FORMAT valid values are `string' and `integer'."
1607 ((equal id-format 'integer) tramp-unknown-id-integer) 1607 ((equal id-format 'integer) tramp-unknown-id-integer)
1608 ((equal id-format 'string) tramp-unknown-id-string))))) 1608 ((equal id-format 'string) tramp-unknown-id-string)))))
1609 1609
1610(defvar tramp-gvfs-get-remote-uid-gid-in-progress nil
1611 "Indication, that remote uid and gid determination is in progress.")
1612
1610(defun tramp-gvfs-maybe-open-connection (vec) 1613(defun tramp-gvfs-maybe-open-connection (vec)
1611 "Maybe open a connection VEC. 1614 "Maybe open a connection VEC.
1612Does not do anything if a connection is already open, but re-opens the 1615Does not do anything if a connection is already open, but re-opens the
@@ -1717,14 +1720,12 @@ connection if a previous connection has died for some reason."
1717 1720
1718 ;; In `tramp-check-cached-permissions', the connection properties 1721 ;; In `tramp-check-cached-permissions', the connection properties
1719 ;; {uig,gid}-{integer,string} are used. We set them to proper values. 1722 ;; {uig,gid}-{integer,string} are used. We set them to proper values.
1720 (unless (tramp-get-connection-property vec "uid-integer" nil) 1723 (unless tramp-gvfs-get-remote-uid-gid-in-progress
1721 (tramp-gvfs-get-remote-uid vec 'integer)) 1724 (let ((tramp-gvfs-get-remote-uid-gid-in-progress t))
1722 (unless (tramp-get-connection-property vec "gid-integer" nil) 1725 (tramp-gvfs-get-remote-uid vec 'integer)
1723 (tramp-gvfs-get-remote-gid vec 'integer)) 1726 (tramp-gvfs-get-remote-gid vec 'integer)
1724 (unless (tramp-get-connection-property vec "uid-string" nil) 1727 (tramp-gvfs-get-remote-uid vec 'string)
1725 (tramp-gvfs-get-remote-uid vec 'string)) 1728 (tramp-gvfs-get-remote-gid vec 'string))))
1726 (unless (tramp-get-connection-property vec "gid-string" nil)
1727 (tramp-gvfs-get-remote-gid vec 'string)))
1728 1729
1729(defun tramp-gvfs-send-command (vec command &rest args) 1730(defun tramp-gvfs-send-command (vec command &rest args)
1730 "Send the COMMAND with its ARGS to connection VEC. 1731 "Send the COMMAND with its ARGS to connection VEC.