Mercurial > emacs
changeset 80402:bc43e42e2fb4
(url-digest-auth): Changed an if so that the interaction between the
PROMPT and OVERWRITE arguments can no longer result in the user being
queried twice for the same login and password information.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Mon, 31 Mar 2008 22:02:24 +0000 |
parents | 52454b9e8627 |
children | 6bbbf0530dfd |
files | lisp/url/url-auth.el |
diffstat | 1 files changed, 12 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/url/url-auth.el Mon Mar 31 22:02:08 2008 +0000 +++ b/lisp/url/url-auth.el Mon Mar 31 22:02:24 2008 +0000 @@ -188,18 +188,18 @@ (string= data (substring file 0 (length data))))) (setq retval (cdr (car byserv)))) (setq byserv (cdr byserv)))) - (if (or (and (not retval) prompt) overwrite) - (progn - (setq user (read-string (url-auth-user-prompt url realm) - (user-real-login-name)) - pass (read-passwd "Password: ") - retval (setq retval - (cons user - (url-digest-auth-create-key - user pass realm - (or url-request-method "GET") - url))) - byserv (assoc server url-digest-auth-storage)) + (if overwrite + (if (and (not retval) prompt) + (setq user (read-string (url-auth-user-prompt url realm) + (user-real-login-name)) + pass (read-passwd "Password: ") + retval (setq retval + (cons user + (url-digest-auth-create-key + user pass realm + (or url-request-method "GET") + url))) + byserv (assoc server url-digest-auth-storage)) (setcdr byserv (cons (cons file retval) (cdr byserv)))))) (t (setq retval nil)))