From: Chong Yidong Date: Mon, 31 Mar 2008 22:02:24 +0000 (+0000) Subject: (url-digest-auth): Changed an if so that the interaction between the X-Git-Tag: emacs-pretest-22.2.90~275 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=54acead6896e1c443d6f60e375c74bd121d3da5d;p=emacs.git (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. --- diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el index 17e03fe2804..584924c8cd6 100644 --- a/lisp/url/url-auth.el +++ b/lisp/url/url-auth.el @@ -188,18 +188,18 @@ instead of hostname:portnum." (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)))