summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-cmds.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2013-11-25 15:51:34 +0100
committerMichael Albinus <michael.albinus@gmx.de>2013-11-25 15:51:34 +0100
commit05ca27d8bdd231f5c67558decc3d708d263fdcca (patch)
tree80b4c2a2ec9e5aa6189e86c9c0ba3cbb0c10ae1b /lisp/net/tramp-cmds.el
parente82ad66cd05a4fd9da7e54d90f562d5d8c472098 (diff)
downloademacs-05ca27d8bdd231f5c67558decc3d708d263fdcca.tar.gz
* net/tramp-cmds.el (tramp-cleanup-connection): Clean up
`tramp-current-connection' only when KEEP-PASSWORD is non-nil.
Diffstat (limited to 'lisp/net/tramp-cmds.el')
-rw-r--r--lisp/net/tramp-cmds.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el
index 35f23caa51a..276651576d7 100644
--- a/lisp/net/tramp-cmds.el
+++ b/lisp/net/tramp-cmds.el
@@ -85,13 +85,14 @@ When called interactively, a Tramp connection has to be selected."
;; Nothing to do.
(message "No Tramp connection found.")
- ;; Cleanup `tramp-current-connection'. Otherwise, we would be
- ;; suppressed in the test suite.
- (setq tramp-current-connection nil)
-
;; Flush password cache.
(unless keep-password (tramp-clear-passwd vec))
+ ;; Cleanup `tramp-current-connection'. Otherwise, we would be
+ ;; suppressed in the test suite. We use `keep-password' as
+ ;; indicator; it is not worth to add a new argument.
+ (when keep-password (setq tramp-current-connection nil))
+
;; Flush file cache.
(tramp-flush-directory-property vec "")