From: Micah Cowan Date: Sat, 17 May 2008 20:01:06 +0000 (-0700) Subject: Handle Ctrl-D, empty password. X-Git-Tag: v1.13~421^2~12^2~20 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=c3bd5412a8a046d0b7113ea692bf6c9333d91be7 Handle Ctrl-D, empty password. --- diff --git a/src/ChangeLog b/src/ChangeLog index 0d4c94b5..ad8a67ec 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2008-05-17 Micah Cowan + + * main.c (main): Handle Ctrl-D on command-line. + 2008-05-15 Steven Schubiger * ftp.c (getftp): Verify that the file actually exists in FTP, by diff --git a/src/main.c b/src/main.c index 159973a0..228bb27f 100644 --- a/src/main.c +++ b/src/main.c @@ -1031,7 +1031,12 @@ for details.\n\n")); int dt; if (opt.ask_passwd) - opt.passwd = prompt_for_password (); + { + opt.passwd = prompt_for_password (); + + if (opt.passwd == NULL || opt.passwd[0] == '\0') + exit (1); + } if ((opt.recursive || opt.page_requisites) && (url_scheme (*t) != SCHEME_FTP || url_uses_proxy (*t)))