aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/net
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/tramp.el16
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index e222a01a273..e2e603a6b0a 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3664,7 +3664,7 @@ the result will be a local, non-Tramp, filename."
3664 (buffer-substring (point) (tramp-compat-line-end-position))))) 3664 (buffer-substring (point) (tramp-compat-line-end-position)))))
3665 (setq localname (concat uname fname)))) 3665 (setq localname (concat uname fname))))
3666 ;; There might be a double slash, for example when "~/" 3666 ;; There might be a double slash, for example when "~/"
3667 ;; expands to "/". Remove this. 3667 ;; expands to "/". Remove this.
3668 (while (string-match "//" localname) 3668 (while (string-match "//" localname)
3669 (setq localname (replace-match "/" t t localname))) 3669 (setq localname (replace-match "/" t t localname)))
3670 ;; No tilde characters in file name, do normal 3670 ;; No tilde characters in file name, do normal
@@ -7433,12 +7433,14 @@ Invokes `password-read' if available, `read-passwd' else."
7433 (funcall (symbol-function 'auth-source-user-or-password) 7433 (funcall (symbol-function 'auth-source-user-or-password)
7434 "password" tramp-current-host tramp-current-method)) 7434 "password" tramp-current-host tramp-current-method))
7435 ;; Try the password cache. 7435 ;; Try the password cache.
7436 (and (functionp 'password-read) 7436 (when (functionp 'password-read)
7437 (tramp-get-connection-property proc "first-password-request" nil) 7437 (unless (tramp-get-connection-property
7438 (let ((password (funcall (symbol-function 'password-read) 7438 proc "first-password-request" nil)
7439 pw-prompt key))) 7439 (funcall (symbol-function 'password-cache-remove) key))
7440 (funcall (symbol-function 'password-cache-add) key password) 7440 (let ((password
7441 password)) 7441 (funcall (symbol-function 'password-read) pw-prompt key)))
7442 (funcall (symbol-function 'password-cache-add) key password)
7443 password))
7442 ;; Else, get the password interactively. 7444 ;; Else, get the password interactively.
7443 (read-passwd pw-prompt)) 7445 (read-passwd pw-prompt))
7444 (tramp-set-connection-property proc "first-password-request" nil)))) 7446 (tramp-set-connection-property proc "first-password-request" nil))))